...
Source file src/runtime/defs_darwin_amd64.go
1
2
3
4 package runtime
5
6 import "unsafe"
7
8 const (
9 _EINTR = 0x4
10 _EFAULT = 0xe
11 _ETIMEDOUT = 0x3c
12
13 _PROT_NONE = 0x0
14 _PROT_READ = 0x1
15 _PROT_WRITE = 0x2
16 _PROT_EXEC = 0x4
17
18 _MAP_ANON = 0x1000
19 _MAP_PRIVATE = 0x2
20 _MAP_FIXED = 0x10
21
22 _MADV_DONTNEED = 0x4
23 _MADV_FREE = 0x5
24 _MADV_FREE_REUSABLE = 0x7
25 _MADV_FREE_REUSE = 0x8
26
27 _SA_SIGINFO = 0x40
28 _SA_RESTART = 0x2
29 _SA_ONSTACK = 0x1
30 _SA_USERTRAMP = 0x100
31 _SA_64REGSET = 0x200
32
33 _SIGHUP = 0x1
34 _SIGINT = 0x2
35 _SIGQUIT = 0x3
36 _SIGILL = 0x4
37 _SIGTRAP = 0x5
38 _SIGABRT = 0x6
39 _SIGEMT = 0x7
40 _SIGFPE = 0x8
41 _SIGKILL = 0x9
42 _SIGBUS = 0xa
43 _SIGSEGV = 0xb
44 _SIGSYS = 0xc
45 _SIGPIPE = 0xd
46 _SIGALRM = 0xe
47 _SIGTERM = 0xf
48 _SIGURG = 0x10
49 _SIGSTOP = 0x11
50 _SIGTSTP = 0x12
51 _SIGCONT = 0x13
52 _SIGCHLD = 0x14
53 _SIGTTIN = 0x15
54 _SIGTTOU = 0x16
55 _SIGIO = 0x17
56 _SIGXCPU = 0x18
57 _SIGXFSZ = 0x19
58 _SIGVTALRM = 0x1a
59 _SIGPROF = 0x1b
60 _SIGWINCH = 0x1c
61 _SIGINFO = 0x1d
62 _SIGUSR1 = 0x1e
63 _SIGUSR2 = 0x1f
64
65 _FPE_INTDIV = 0x7
66 _FPE_INTOVF = 0x8
67 _FPE_FLTDIV = 0x1
68 _FPE_FLTOVF = 0x2
69 _FPE_FLTUND = 0x3
70 _FPE_FLTRES = 0x4
71 _FPE_FLTINV = 0x5
72 _FPE_FLTSUB = 0x6
73
74 _BUS_ADRALN = 0x1
75 _BUS_ADRERR = 0x2
76 _BUS_OBJERR = 0x3
77
78 _SEGV_MAPERR = 0x1
79 _SEGV_ACCERR = 0x2
80
81 _ITIMER_REAL = 0x0
82 _ITIMER_VIRTUAL = 0x1
83 _ITIMER_PROF = 0x2
84
85 _EV_ADD = 0x1
86 _EV_DELETE = 0x2
87 _EV_CLEAR = 0x20
88 _EV_RECEIPT = 0x40
89 _EV_ERROR = 0x4000
90 _EV_EOF = 0x8000
91 _EVFILT_READ = -0x1
92 _EVFILT_WRITE = -0x2
93
94 _PTHREAD_CREATE_DETACHED = 0x2
95
96 _F_SETFD = 0x2
97 _F_GETFL = 0x3
98 _F_SETFL = 0x4
99 _FD_CLOEXEC = 0x1
100
101 _O_NONBLOCK = 4
102 )
103
104 type stackt struct {
105 ss_sp *byte
106 ss_size uintptr
107 ss_flags int32
108 pad_cgo_0 [4]byte
109 }
110
111 type sigactiont struct {
112 __sigaction_u [8]byte
113 sa_tramp unsafe.Pointer
114 sa_mask uint32
115 sa_flags int32
116 }
117
118 type usigactiont struct {
119 __sigaction_u [8]byte
120 sa_mask uint32
121 sa_flags int32
122 }
123
124 type siginfo struct {
125 si_signo int32
126 si_errno int32
127 si_code int32
128 si_pid int32
129 si_uid uint32
130 si_status int32
131 si_addr uint64
132 si_value [8]byte
133 si_band int64
134 __pad [7]uint64
135 }
136
137 type timeval struct {
138 tv_sec int64
139 tv_usec int32
140 pad_cgo_0 [4]byte
141 }
142
143 func (tv *timeval) set_usec(x int32) {
144 tv.tv_usec = x
145 }
146
147 type itimerval struct {
148 it_interval timeval
149 it_value timeval
150 }
151
152 type timespec struct {
153 tv_sec int64
154 tv_nsec int64
155 }
156
157
158 func (ts *timespec) setNsec(ns int64) {
159 ts.tv_sec = ns / 1e9
160 ts.tv_nsec = ns % 1e9
161 }
162
163 type fpcontrol struct {
164 pad_cgo_0 [2]byte
165 }
166
167 type fpstatus struct {
168 pad_cgo_0 [2]byte
169 }
170
171 type regmmst struct {
172 mmst_reg [10]int8
173 mmst_rsrv [6]int8
174 }
175
176 type regxmm struct {
177 xmm_reg [16]int8
178 }
179
180 type regs64 struct {
181 rax uint64
182 rbx uint64
183 rcx uint64
184 rdx uint64
185 rdi uint64
186 rsi uint64
187 rbp uint64
188 rsp uint64
189 r8 uint64
190 r9 uint64
191 r10 uint64
192 r11 uint64
193 r12 uint64
194 r13 uint64
195 r14 uint64
196 r15 uint64
197 rip uint64
198 rflags uint64
199 cs uint64
200 fs uint64
201 gs uint64
202 }
203
204 type floatstate64 struct {
205 fpu_reserved [2]int32
206 fpu_fcw fpcontrol
207 fpu_fsw fpstatus
208 fpu_ftw uint8
209 fpu_rsrv1 uint8
210 fpu_fop uint16
211 fpu_ip uint32
212 fpu_cs uint16
213 fpu_rsrv2 uint16
214 fpu_dp uint32
215 fpu_ds uint16
216 fpu_rsrv3 uint16
217 fpu_mxcsr uint32
218 fpu_mxcsrmask uint32
219 fpu_stmm0 regmmst
220 fpu_stmm1 regmmst
221 fpu_stmm2 regmmst
222 fpu_stmm3 regmmst
223 fpu_stmm4 regmmst
224 fpu_stmm5 regmmst
225 fpu_stmm6 regmmst
226 fpu_stmm7 regmmst
227 fpu_xmm0 regxmm
228 fpu_xmm1 regxmm
229 fpu_xmm2 regxmm
230 fpu_xmm3 regxmm
231 fpu_xmm4 regxmm
232 fpu_xmm5 regxmm
233 fpu_xmm6 regxmm
234 fpu_xmm7 regxmm
235 fpu_xmm8 regxmm
236 fpu_xmm9 regxmm
237 fpu_xmm10 regxmm
238 fpu_xmm11 regxmm
239 fpu_xmm12 regxmm
240 fpu_xmm13 regxmm
241 fpu_xmm14 regxmm
242 fpu_xmm15 regxmm
243 fpu_rsrv4 [96]int8
244 fpu_reserved1 int32
245 }
246
247 type exceptionstate64 struct {
248 trapno uint16
249 cpu uint16
250 err uint32
251 faultvaddr uint64
252 }
253
254 type mcontext64 struct {
255 es exceptionstate64
256 ss regs64
257 fs floatstate64
258 pad_cgo_0 [4]byte
259 }
260
261 type regs32 struct {
262 eax uint32
263 ebx uint32
264 ecx uint32
265 edx uint32
266 edi uint32
267 esi uint32
268 ebp uint32
269 esp uint32
270 ss uint32
271 eflags uint32
272 eip uint32
273 cs uint32
274 ds uint32
275 es uint32
276 fs uint32
277 gs uint32
278 }
279
280 type floatstate32 struct {
281 fpu_reserved [2]int32
282 fpu_fcw fpcontrol
283 fpu_fsw fpstatus
284 fpu_ftw uint8
285 fpu_rsrv1 uint8
286 fpu_fop uint16
287 fpu_ip uint32
288 fpu_cs uint16
289 fpu_rsrv2 uint16
290 fpu_dp uint32
291 fpu_ds uint16
292 fpu_rsrv3 uint16
293 fpu_mxcsr uint32
294 fpu_mxcsrmask uint32
295 fpu_stmm0 regmmst
296 fpu_stmm1 regmmst
297 fpu_stmm2 regmmst
298 fpu_stmm3 regmmst
299 fpu_stmm4 regmmst
300 fpu_stmm5 regmmst
301 fpu_stmm6 regmmst
302 fpu_stmm7 regmmst
303 fpu_xmm0 regxmm
304 fpu_xmm1 regxmm
305 fpu_xmm2 regxmm
306 fpu_xmm3 regxmm
307 fpu_xmm4 regxmm
308 fpu_xmm5 regxmm
309 fpu_xmm6 regxmm
310 fpu_xmm7 regxmm
311 fpu_rsrv4 [224]int8
312 fpu_reserved1 int32
313 }
314
315 type exceptionstate32 struct {
316 trapno uint16
317 cpu uint16
318 err uint32
319 faultvaddr uint32
320 }
321
322 type mcontext32 struct {
323 es exceptionstate32
324 ss regs32
325 fs floatstate32
326 }
327
328 type ucontext struct {
329 uc_onstack int32
330 uc_sigmask uint32
331 uc_stack stackt
332 uc_link *ucontext
333 uc_mcsize uint64
334 uc_mcontext *mcontext64
335 }
336
337 type keventt struct {
338 ident uint64
339 filter int16
340 flags uint16
341 fflags uint32
342 data int64
343 udata *byte
344 }
345
346 type pthread uintptr
347 type pthreadattr struct {
348 X__sig int64
349 X__opaque [56]int8
350 }
351 type pthreadmutex struct {
352 X__sig int64
353 X__opaque [56]int8
354 }
355 type pthreadmutexattr struct {
356 X__sig int64
357 X__opaque [8]int8
358 }
359 type pthreadcond struct {
360 X__sig int64
361 X__opaque [40]int8
362 }
363 type pthreadcondattr struct {
364 X__sig int64
365 X__opaque [8]int8
366 }
367
368 type machTimebaseInfo struct {
369 numer uint32
370 denom uint32
371 }
372
View as plain text