...
Source file src/runtime/defs_freebsd_386.go
1
2
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
19 _PROT_NONE = 0x0
20 _PROT_READ = 0x1
21 _PROT_WRITE = 0x2
22 _PROT_EXEC = 0x4
23
24 _MAP_ANON = 0x1000
25 _MAP_SHARED = 0x1
26 _MAP_PRIVATE = 0x2
27 _MAP_FIXED = 0x10
28
29 _MADV_FREE = 0x5
30
31 _SA_SIGINFO = 0x40
32 _SA_RESTART = 0x2
33 _SA_ONSTACK = 0x1
34
35 _CLOCK_MONOTONIC = 0x4
36 _CLOCK_REALTIME = 0x0
37
38 _UMTX_OP_WAIT_UINT = 0xb
39 _UMTX_OP_WAIT_UINT_PRIVATE = 0xf
40 _UMTX_OP_WAKE = 0x3
41 _UMTX_OP_WAKE_PRIVATE = 0x10
42
43 _SIGHUP = 0x1
44 _SIGINT = 0x2
45 _SIGQUIT = 0x3
46 _SIGILL = 0x4
47 _SIGTRAP = 0x5
48 _SIGABRT = 0x6
49 _SIGEMT = 0x7
50 _SIGFPE = 0x8
51 _SIGKILL = 0x9
52 _SIGBUS = 0xa
53 _SIGSEGV = 0xb
54 _SIGSYS = 0xc
55 _SIGPIPE = 0xd
56 _SIGALRM = 0xe
57 _SIGTERM = 0xf
58 _SIGURG = 0x10
59 _SIGSTOP = 0x11
60 _SIGTSTP = 0x12
61 _SIGCONT = 0x13
62 _SIGCHLD = 0x14
63 _SIGTTIN = 0x15
64 _SIGTTOU = 0x16
65 _SIGIO = 0x17
66 _SIGXCPU = 0x18
67 _SIGXFSZ = 0x19
68 _SIGVTALRM = 0x1a
69 _SIGPROF = 0x1b
70 _SIGWINCH = 0x1c
71 _SIGINFO = 0x1d
72 _SIGUSR1 = 0x1e
73 _SIGUSR2 = 0x1f
74
75 _FPE_INTDIV = 0x2
76 _FPE_INTOVF = 0x1
77 _FPE_FLTDIV = 0x3
78 _FPE_FLTOVF = 0x4
79 _FPE_FLTUND = 0x5
80 _FPE_FLTRES = 0x6
81 _FPE_FLTINV = 0x7
82 _FPE_FLTSUB = 0x8
83
84 _BUS_ADRALN = 0x1
85 _BUS_ADRERR = 0x2
86 _BUS_OBJERR = 0x3
87
88 _SEGV_MAPERR = 0x1
89 _SEGV_ACCERR = 0x2
90
91 _ITIMER_REAL = 0x0
92 _ITIMER_VIRTUAL = 0x1
93 _ITIMER_PROF = 0x2
94
95 _EV_ADD = 0x1
96 _EV_DELETE = 0x2
97 _EV_CLEAR = 0x20
98 _EV_RECEIPT = 0x40
99 _EV_ERROR = 0x4000
100 _EV_EOF = 0x8000
101 _EVFILT_READ = -0x1
102 _EVFILT_WRITE = -0x2
103 )
104
105 type rtprio struct {
106 _type uint16
107 prio uint16
108 }
109
110 type thrparam struct {
111 start_func uintptr
112 arg unsafe.Pointer
113 stack_base uintptr
114 stack_size uintptr
115 tls_base unsafe.Pointer
116 tls_size uintptr
117 child_tid unsafe.Pointer
118 parent_tid *int32
119 flags int32
120 rtp *rtprio
121 spare [3]uintptr
122 }
123
124 type sigset struct {
125 __bits [4]uint32
126 }
127
128 type stackt struct {
129 ss_sp uintptr
130 ss_size uintptr
131 ss_flags int32
132 }
133
134 type siginfo struct {
135 si_signo int32
136 si_errno int32
137 si_code int32
138 si_pid int32
139 si_uid uint32
140 si_status int32
141 si_addr uintptr
142 si_value [4]byte
143 _reason [32]byte
144 }
145
146 type mcontext struct {
147 mc_onstack uint32
148 mc_gs uint32
149 mc_fs uint32
150 mc_es uint32
151 mc_ds uint32
152 mc_edi uint32
153 mc_esi uint32
154 mc_ebp uint32
155 mc_isp uint32
156 mc_ebx uint32
157 mc_edx uint32
158 mc_ecx uint32
159 mc_eax uint32
160 mc_trapno uint32
161 mc_err uint32
162 mc_eip uint32
163 mc_cs uint32
164 mc_eflags uint32
165 mc_esp uint32
166 mc_ss uint32
167 mc_len uint32
168 mc_fpformat uint32
169 mc_ownedfp uint32
170 mc_flags uint32
171 mc_fpstate [128]uint32
172 mc_fsbase uint32
173 mc_gsbase uint32
174 mc_xfpustate uint32
175 mc_xfpustate_len uint32
176 mc_spare2 [4]uint32
177 }
178
179 type ucontext struct {
180 uc_sigmask sigset
181 uc_mcontext mcontext
182 uc_link *ucontext
183 uc_stack stackt
184 uc_flags int32
185 __spare__ [4]int32
186 pad_cgo_0 [12]byte
187 }
188
189 type timespec struct {
190 tv_sec int32
191 tv_nsec int32
192 }
193
194
195 func (ts *timespec) setNsec(ns int64) {
196 ts.tv_sec = timediv(ns, 1e9, &ts.tv_nsec)
197 }
198
199 type timeval struct {
200 tv_sec int32
201 tv_usec int32
202 }
203
204 func (tv *timeval) set_usec(x int32) {
205 tv.tv_usec = x
206 }
207
208 type itimerval struct {
209 it_interval timeval
210 it_value timeval
211 }
212
213 type umtx_time struct {
214 _timeout timespec
215 _flags uint32
216 _clockid uint32
217 }
218
219 type keventt struct {
220 ident uint32
221 filter int16
222 flags uint16
223 fflags uint32
224 data int32
225 udata *byte
226 }
227
228 type bintime struct {
229 sec int32
230 frac uint64
231 }
232
233 type vdsoTimehands struct {
234 algo uint32
235 gen uint32
236 scale uint64
237 offset_count uint32
238 counter_mask uint32
239 offset bintime
240 boottime bintime
241 x86_shift uint32
242 x86_hpet_idx uint32
243 res [6]uint32
244 }
245
246 type vdsoTimekeep struct {
247 ver uint32
248 enabled uint32
249 current uint32
250 }
251
252 const (
253 _VDSO_TK_VER_CURR = 0x1
254
255 vdsoTimehandsSize = 0x50
256 vdsoTimekeepSize = 0xc
257 )
258
View as plain text