...
Source file
src/runtime/defs_darwin_arm64.go
Documentation: runtime
1
2
3
4 package runtime
5
6 import "unsafe"
7
8 const (
9 _EINTR = 0x4
10 _EFAULT = 0xe
11 _EAGAIN = 0x23
12 _ETIMEDOUT = 0x3c
13
14 _PROT_NONE = 0x0
15 _PROT_READ = 0x1
16 _PROT_WRITE = 0x2
17 _PROT_EXEC = 0x4
18
19 _MAP_ANON = 0x1000
20 _MAP_PRIVATE = 0x2
21 _MAP_FIXED = 0x10
22
23 _MADV_DONTNEED = 0x4
24 _MADV_FREE = 0x5
25 _MADV_FREE_REUSABLE = 0x7
26 _MADV_FREE_REUSE = 0x8
27
28 _SA_SIGINFO = 0x40
29 _SA_RESTART = 0x2
30 _SA_ONSTACK = 0x1
31 _SA_USERTRAMP = 0x100
32 _SA_64REGSET = 0x200
33
34 _SIGHUP = 0x1
35 _SIGINT = 0x2
36 _SIGQUIT = 0x3
37 _SIGILL = 0x4
38 _SIGTRAP = 0x5
39 _SIGABRT = 0x6
40 _SIGEMT = 0x7
41 _SIGFPE = 0x8
42 _SIGKILL = 0x9
43 _SIGBUS = 0xa
44 _SIGSEGV = 0xb
45 _SIGSYS = 0xc
46 _SIGPIPE = 0xd
47 _SIGALRM = 0xe
48 _SIGTERM = 0xf
49 _SIGURG = 0x10
50 _SIGSTOP = 0x11
51 _SIGTSTP = 0x12
52 _SIGCONT = 0x13
53 _SIGCHLD = 0x14
54 _SIGTTIN = 0x15
55 _SIGTTOU = 0x16
56 _SIGIO = 0x17
57 _SIGXCPU = 0x18
58 _SIGXFSZ = 0x19
59 _SIGVTALRM = 0x1a
60 _SIGPROF = 0x1b
61 _SIGWINCH = 0x1c
62 _SIGINFO = 0x1d
63 _SIGUSR1 = 0x1e
64 _SIGUSR2 = 0x1f
65
66 _FPE_INTDIV = 0x7
67 _FPE_INTOVF = 0x8
68 _FPE_FLTDIV = 0x1
69 _FPE_FLTOVF = 0x2
70 _FPE_FLTUND = 0x3
71 _FPE_FLTRES = 0x4
72 _FPE_FLTINV = 0x5
73 _FPE_FLTSUB = 0x6
74
75 _BUS_ADRALN = 0x1
76 _BUS_ADRERR = 0x2
77 _BUS_OBJERR = 0x3
78
79 _SEGV_MAPERR = 0x1
80 _SEGV_ACCERR = 0x2
81
82 _ITIMER_REAL = 0x0
83 _ITIMER_VIRTUAL = 0x1
84 _ITIMER_PROF = 0x2
85
86 _EV_ADD = 0x1
87 _EV_DELETE = 0x2
88 _EV_CLEAR = 0x20
89 _EV_RECEIPT = 0x40
90 _EV_ERROR = 0x4000
91 _EV_EOF = 0x8000
92 _EVFILT_READ = -0x1
93 _EVFILT_WRITE = -0x2
94
95 _PTHREAD_CREATE_DETACHED = 0x2
96
97 _PTHREAD_KEYS_MAX = 512
98
99 _F_GETFL = 0x3
100 _F_SETFL = 0x4
101
102 _O_WRONLY = 0x1
103 _O_NONBLOCK = 0x4
104 _O_CREAT = 0x200
105 _O_TRUNC = 0x400
106
107 _VM_REGION_BASIC_INFO_COUNT_64 = 0x9
108 _VM_REGION_BASIC_INFO_64 = 0x9
109 )
110
111 type stackt struct {
112 ss_sp *byte
113 ss_size uintptr
114 ss_flags int32
115 pad_cgo_0 [4]byte
116 }
117
118 type sigactiont struct {
119 __sigaction_u [8]byte
120 sa_tramp unsafe.Pointer
121 sa_mask uint32
122 sa_flags int32
123 }
124
125 type usigactiont struct {
126 __sigaction_u [8]byte
127 sa_mask uint32
128 sa_flags int32
129 }
130
131 type siginfo struct {
132 si_signo int32
133 si_errno int32
134 si_code int32
135 si_pid int32
136 si_uid uint32
137 si_status int32
138 si_addr *byte
139 si_value [8]byte
140 si_band int64
141 __pad [7]uint64
142 }
143
144 type timeval struct {
145 tv_sec int64
146 tv_usec int32
147 pad_cgo_0 [4]byte
148 }
149
150 func (tv *timeval) set_usec(x int32) {
151 tv.tv_usec = x
152 }
153
154 type itimerval struct {
155 it_interval timeval
156 it_value timeval
157 }
158
159 type timespec struct {
160 tv_sec int64
161 tv_nsec int64
162 }
163
164
165 func (ts *timespec) setNsec(ns int64) {
166 ts.tv_sec = ns / 1e9
167 ts.tv_nsec = ns % 1e9
168 }
169
170 type exceptionstate64 struct {
171 far uint64
172 esr uint32
173 exc uint32
174 }
175
176 type regs64 struct {
177 x [29]uint64
178 fp uint64
179 lr uint64
180 sp uint64
181 pc uint64
182 cpsr uint32
183 __pad uint32
184 }
185
186 type neonstate64 struct {
187 v [64]uint64
188 fpsr uint32
189 fpcr uint32
190 }
191
192 type mcontext64 struct {
193 es exceptionstate64
194 ss regs64
195 ns neonstate64
196 }
197
198 type ucontext struct {
199 uc_onstack int32
200 uc_sigmask uint32
201 uc_stack stackt
202 uc_link *ucontext
203 uc_mcsize uint64
204 uc_mcontext *mcontext64
205 }
206
207 type keventt struct {
208 ident uint64
209 filter int16
210 flags uint16
211 fflags uint32
212 data int64
213 udata *byte
214 }
215
216 type pthread uintptr
217 type pthreadattr struct {
218 X__sig int64
219 X__opaque [56]int8
220 }
221 type pthreadmutex struct {
222 X__sig int64
223 X__opaque [56]int8
224 }
225 type pthreadmutexattr struct {
226 X__sig int64
227 X__opaque [8]int8
228 }
229 type pthreadcond struct {
230 X__sig int64
231 X__opaque [40]int8
232 }
233 type pthreadcondattr struct {
234 X__sig int64
235 X__opaque [8]int8
236 }
237
238 type machTimebaseInfo struct {
239 numer uint32
240 denom uint32
241 }
242
243 type pthreadkey uint64
244
245 type machPort uint32
246 type machVMMapRead uint32
247 type machVMAddress uint64
248 type machVMSize uint64
249 type machVMRegionFlavour int32
250 type machVMRegionInfo *int32
251 type machMsgTypeNumber uint32
252
View as plain text