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