github.com/mtsmfm/go/src@v0.0.0-20221020090648-44bdcb9f8fde/runtime/defs_freebsd_arm64.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 // *int64 125 parent_tid *int64 126 flags int32 127 pad_cgo_0 [4]byte 128 rtp *rtprio 129 spare [3]uintptr 130 } 131 132 type thread int64 // long 133 134 type sigset struct { 135 __bits [4]uint32 136 } 137 138 type stackt struct { 139 ss_sp uintptr 140 ss_size uintptr 141 ss_flags int32 142 pad_cgo_0 [4]byte 143 } 144 145 type siginfo struct { 146 si_signo int32 147 si_errno int32 148 si_code int32 149 si_pid int32 150 si_uid uint32 151 si_status int32 152 si_addr uint64 153 si_value [8]byte 154 _reason [40]byte 155 } 156 157 type gpregs struct { 158 gp_x [30]uint64 159 gp_lr uint64 160 gp_sp uint64 161 gp_elr uint64 162 gp_spsr uint32 163 gp_pad int32 164 } 165 166 type fpregs struct { 167 fp_q [64]uint64 // actually [32]uint128 168 fp_sr uint32 169 fp_cr uint32 170 fp_flags int32 171 fp_pad int32 172 } 173 174 type mcontext struct { 175 mc_gpregs gpregs 176 mc_fpregs fpregs 177 mc_flags int32 178 mc_pad int32 179 mc_spare [8]uint64 180 } 181 182 type ucontext struct { 183 uc_sigmask sigset 184 uc_mcontext mcontext 185 uc_link *ucontext 186 uc_stack stackt 187 uc_flags int32 188 __spare__ [4]int32 189 pad_cgo_0 [12]byte 190 } 191 192 type timespec struct { 193 tv_sec int64 194 tv_nsec int64 195 } 196 197 //go:nosplit 198 func (ts *timespec) setNsec(ns int64) { 199 ts.tv_sec = ns / 1e9 200 ts.tv_nsec = ns % 1e9 201 } 202 203 type timeval struct { 204 tv_sec int64 205 tv_usec int64 206 } 207 208 func (tv *timeval) set_usec(x int32) { 209 tv.tv_usec = int64(x) 210 } 211 212 type itimerval struct { 213 it_interval timeval 214 it_value timeval 215 } 216 217 type umtx_time struct { 218 _timeout timespec 219 _flags uint32 220 _clockid uint32 221 } 222 223 type keventt struct { 224 ident uint64 225 filter int16 226 flags uint16 227 fflags uint32 228 data int64 229 udata *byte 230 ext [4]uint64 231 } 232 233 type bintime struct { 234 sec int64 235 frac uint64 236 } 237 238 type vdsoTimehands struct { 239 algo uint32 240 gen uint32 241 scale uint64 242 offset_count uint32 243 counter_mask uint32 244 offset bintime 245 boottime bintime 246 physical uint32 247 res [7]uint32 248 } 249 250 type vdsoTimekeep struct { 251 ver uint32 252 enabled uint32 253 current uint32 254 pad_cgo_0 [4]byte 255 } 256 257 const ( 258 _VDSO_TK_VER_CURR = 0x1 259 260 vdsoTimehandsSize = 0x58 261 vdsoTimekeepSize = 0x10 262 )