...
Source file src/runtime/defs_darwin_arm64.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 *byte
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 exceptionstate64 struct {
164 far uint64
165 esr uint32
166 exc uint32
167 }
168
169 type regs64 struct {
170 x [29]uint64
171 fp uint64
172 lr uint64
173 sp uint64
174 pc uint64
175 cpsr uint32
176 __pad uint32
177 }
178
179 type neonstate64 struct {
180 v [64]uint64
181 fpsr uint32
182 fpcr uint32
183 }
184
185 type mcontext64 struct {
186 es exceptionstate64
187 ss regs64
188 ns neonstate64
189 }
190
191 type ucontext struct {
192 uc_onstack int32
193 uc_sigmask uint32
194 uc_stack stackt
195 uc_link *ucontext
196 uc_mcsize uint64
197 uc_mcontext *mcontext64
198 }
199
200 type keventt struct {
201 ident uint64
202 filter int16
203 flags uint16
204 fflags uint32
205 data int64
206 udata *byte
207 }
208
209 type pthread uintptr
210 type pthreadattr struct {
211 X__sig int64
212 X__opaque [56]int8
213 }
214 type pthreadmutex struct {
215 X__sig int64
216 X__opaque [56]int8
217 }
218 type pthreadmutexattr struct {
219 X__sig int64
220 X__opaque [8]int8
221 }
222 type pthreadcond struct {
223 X__sig int64
224 X__opaque [40]int8
225 }
226 type pthreadcondattr struct {
227 X__sig int64
228 X__opaque [8]int8
229 }
230
231 type machTimebaseInfo struct {
232 numer uint32
233 denom uint32
234 }
235
View as plain text