github.com/hikaru7719/go@v0.0.0-20181025140707-c8b2ac68906a/src/runtime/defs_freebsd_arm.go (about) 1 // created by cgo -cdefs and then converted to Go 2 // cgo -cdefs defs_freebsd.go 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 // *int32 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 __gregs [17]uint32 148 __fpu [140]byte 149 } 150 151 type ucontext struct { 152 uc_sigmask sigset 153 uc_mcontext mcontext 154 uc_link *ucontext 155 uc_stack stackt 156 uc_flags int32 157 __spare__ [4]int32 158 } 159 160 type timespec struct { 161 tv_sec int64 162 tv_nsec int32 163 pad_cgo_0 [4]byte 164 } 165 166 func (ts *timespec) set_sec(x int64) { 167 ts.tv_sec = x 168 } 169 170 type timeval struct { 171 tv_sec int64 172 tv_usec int32 173 pad_cgo_0 [4]byte 174 } 175 176 func (tv *timeval) set_usec(x int32) { 177 tv.tv_usec = x 178 } 179 180 type itimerval struct { 181 it_interval timeval 182 it_value timeval 183 } 184 185 type umtx_time struct { 186 _timeout timespec 187 _flags uint32 188 _clockid uint32 189 } 190 191 type keventt struct { 192 ident uint32 193 filter int16 194 flags uint16 195 fflags uint32 196 data int32 197 udata *byte 198 } 199 200 type bintime struct { 201 sec int64 202 frac uint64 203 } 204 205 type vdsoTimehands struct { 206 algo uint32 207 gen uint32 208 scale uint64 209 offset_count uint32 210 counter_mask uint32 211 offset bintime 212 boottime bintime 213 physical uint32 214 res [7]uint32 215 } 216 217 type vdsoTimekeep struct { 218 ver uint32 219 enabled uint32 220 current uint32 221 pad_cgo_0 [4]byte 222 } 223 224 const ( 225 _VDSO_TK_VER_CURR = 0x1 226 227 vdsoTimehandsSize = 0x58 228 vdsoTimekeepSize = 0x10 229 )