]> Cypherpunks.ru repositories - gostls13.git/blob - src/runtime/defs_freebsd_riscv64.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / src / runtime / defs_freebsd_riscv64.go
1 // created by cgo -cdefs and then converted to Go
2 // cgo -cdefs defs_freebsd.go
3
4 package runtime
5
6 import "unsafe"
7
8 const (
9         _NBBY            = 0x8
10         _CTL_MAXNAME     = 0x18
11         _CPU_LEVEL_WHICH = 0x3
12         _CPU_WHICH_PID   = 0x2
13 )
14
15 const (
16         _EINTR     = 0x4
17         _EFAULT    = 0xe
18         _EAGAIN    = 0x23
19         _ETIMEDOUT = 0x3c
20
21         _O_WRONLY   = 0x1
22         _O_NONBLOCK = 0x4
23         _O_CREAT    = 0x200
24         _O_TRUNC    = 0x400
25         _O_CLOEXEC  = 0x100000
26
27         _PROT_NONE  = 0x0
28         _PROT_READ  = 0x1
29         _PROT_WRITE = 0x2
30         _PROT_EXEC  = 0x4
31
32         _MAP_ANON    = 0x1000
33         _MAP_SHARED  = 0x1
34         _MAP_PRIVATE = 0x2
35         _MAP_FIXED   = 0x10
36
37         _MADV_DONTNEED = 0x4
38         _MADV_FREE     = 0x5
39
40         _SA_SIGINFO = 0x40
41         _SA_RESTART = 0x2
42         _SA_ONSTACK = 0x1
43
44         _CLOCK_MONOTONIC = 0x4
45         _CLOCK_REALTIME  = 0x0
46
47         _UMTX_OP_WAIT_UINT         = 0xb
48         _UMTX_OP_WAIT_UINT_PRIVATE = 0xf
49         _UMTX_OP_WAKE              = 0x3
50         _UMTX_OP_WAKE_PRIVATE      = 0x10
51
52         _SIGHUP    = 0x1
53         _SIGINT    = 0x2
54         _SIGQUIT   = 0x3
55         _SIGILL    = 0x4
56         _SIGTRAP   = 0x5
57         _SIGABRT   = 0x6
58         _SIGEMT    = 0x7
59         _SIGFPE    = 0x8
60         _SIGKILL   = 0x9
61         _SIGBUS    = 0xa
62         _SIGSEGV   = 0xb
63         _SIGSYS    = 0xc
64         _SIGPIPE   = 0xd
65         _SIGALRM   = 0xe
66         _SIGTERM   = 0xf
67         _SIGURG    = 0x10
68         _SIGSTOP   = 0x11
69         _SIGTSTP   = 0x12
70         _SIGCONT   = 0x13
71         _SIGCHLD   = 0x14
72         _SIGTTIN   = 0x15
73         _SIGTTOU   = 0x16
74         _SIGIO     = 0x17
75         _SIGXCPU   = 0x18
76         _SIGXFSZ   = 0x19
77         _SIGVTALRM = 0x1a
78         _SIGPROF   = 0x1b
79         _SIGWINCH  = 0x1c
80         _SIGINFO   = 0x1d
81         _SIGUSR1   = 0x1e
82         _SIGUSR2   = 0x1f
83
84         _FPE_INTDIV = 0x2
85         _FPE_INTOVF = 0x1
86         _FPE_FLTDIV = 0x3
87         _FPE_FLTOVF = 0x4
88         _FPE_FLTUND = 0x5
89         _FPE_FLTRES = 0x6
90         _FPE_FLTINV = 0x7
91         _FPE_FLTSUB = 0x8
92
93         _BUS_ADRALN = 0x1
94         _BUS_ADRERR = 0x2
95         _BUS_OBJERR = 0x3
96
97         _SEGV_MAPERR = 0x1
98         _SEGV_ACCERR = 0x2
99
100         _ITIMER_REAL    = 0x0
101         _ITIMER_VIRTUAL = 0x1
102         _ITIMER_PROF    = 0x2
103
104         _EV_ADD       = 0x1
105         _EV_DELETE    = 0x2
106         _EV_CLEAR     = 0x20
107         _EV_RECEIPT   = 0x40
108         _EV_ERROR     = 0x4000
109         _EV_EOF       = 0x8000
110         _EVFILT_READ  = -0x1
111         _EVFILT_WRITE = -0x2
112 )
113
114 type rtprio struct {
115         _type uint16
116         prio  uint16
117 }
118
119 type thrparam struct {
120         start_func uintptr
121         arg        unsafe.Pointer
122         stack_base uintptr
123         stack_size uintptr
124         tls_base   unsafe.Pointer
125         tls_size   uintptr
126         child_tid  unsafe.Pointer // *int64
127         parent_tid *int64
128         flags      int32
129         pad_cgo_0  [4]byte
130         rtp        *rtprio
131         spare      [3]uintptr
132 }
133
134 type thread int64 // long
135
136 type sigset struct {
137         __bits [4]uint32
138 }
139
140 type stackt struct {
141         ss_sp     uintptr
142         ss_size   uintptr
143         ss_flags  int32
144         pad_cgo_0 [4]byte
145 }
146
147 type siginfo struct {
148         si_signo  int32
149         si_errno  int32
150         si_code   int32
151         si_pid    int32
152         si_uid    uint32
153         si_status int32
154         si_addr   uint64
155         si_value  [8]byte
156         _reason   [40]byte
157 }
158
159 type gpregs struct {
160         gp_ra      uint64
161         gp_sp      uint64
162         gp_gp      uint64
163         gp_tp      uint64
164         gp_t       [7]uint64
165         gp_s       [12]uint64
166         gp_a       [8]uint64
167         gp_sepc    uint64
168         gp_sstatus uint64
169 }
170
171 type fpregs struct {
172         fp_x     [64]uint64 // actually __uint64_t fp_x[32][2]
173         fp_fcsr  uint64
174         fp_flags int32
175         pad      int32
176 }
177
178 type mcontext struct {
179         mc_gpregs gpregs
180         mc_fpregs fpregs
181         mc_flags  int32
182         mc_pad    int32
183         mc_spare  [8]uint64
184 }
185
186 type ucontext struct {
187         uc_sigmask  sigset
188         uc_mcontext mcontext
189         uc_link     *ucontext
190         uc_stack    stackt
191         uc_flags    int32
192         __spare__   [4]int32
193         pad_cgo_0   [12]byte
194 }
195
196 type timespec struct {
197         tv_sec  int64
198         tv_nsec int64
199 }
200
201 //go:nosplit
202 func (ts *timespec) setNsec(ns int64) {
203         ts.tv_sec = ns / 1e9
204         ts.tv_nsec = ns % 1e9
205 }
206
207 type timeval struct {
208         tv_sec  int64
209         tv_usec int64
210 }
211
212 func (tv *timeval) set_usec(x int32) {
213         tv.tv_usec = int64(x)
214 }
215
216 type itimerval struct {
217         it_interval timeval
218         it_value    timeval
219 }
220
221 type umtx_time struct {
222         _timeout timespec
223         _flags   uint32
224         _clockid uint32
225 }
226
227 type keventt struct {
228         ident  uint64
229         filter int16
230         flags  uint16
231         fflags uint32
232         data   int64
233         udata  *byte
234         ext    [4]uint64
235 }
236
237 type bintime struct {
238         sec  int64
239         frac uint64
240 }
241
242 type vdsoTimehands struct {
243         algo         uint32
244         gen          uint32
245         scale        uint64
246         offset_count uint32
247         counter_mask uint32
248         offset       bintime
249         boottime     bintime
250         physical     uint32
251         res          [7]uint32
252 }
253
254 type vdsoTimekeep struct {
255         ver       uint32
256         enabled   uint32
257         current   uint32
258         pad_cgo_0 [4]byte
259 }
260
261 const (
262         _VDSO_TK_VER_CURR = 0x1
263
264         vdsoTimehandsSize = 0x58
265         vdsoTimekeepSize  = 0x10
266 )