github.com/geraldss/go/src@v0.0.0-20210511222824-ac7d0ebfc235/runtime/defs1_solaris_amd64.go (about) 1 // created by cgo -cdefs and then converted to Go 2 // cgo -cdefs defs_solaris.go defs_solaris_amd64.go 3 4 package runtime 5 6 const ( 7 _EINTR = 0x4 8 _EBADF = 0x9 9 _EFAULT = 0xe 10 _EAGAIN = 0xb 11 _EBUSY = 0x10 12 _ETIME = 0x3e 13 _ETIMEDOUT = 0x91 14 _EWOULDBLOCK = 0xb 15 _EINPROGRESS = 0x96 16 _ENOSYS = 0x59 17 18 _PROT_NONE = 0x0 19 _PROT_READ = 0x1 20 _PROT_WRITE = 0x2 21 _PROT_EXEC = 0x4 22 23 _MAP_ANON = 0x100 24 _MAP_PRIVATE = 0x2 25 _MAP_FIXED = 0x10 26 27 _MADV_FREE = 0x5 28 29 _SA_SIGINFO = 0x8 30 _SA_RESTART = 0x4 31 _SA_ONSTACK = 0x1 32 33 _SIGHUP = 0x1 34 _SIGINT = 0x2 35 _SIGQUIT = 0x3 36 _SIGILL = 0x4 37 _SIGTRAP = 0x5 38 _SIGABRT = 0x6 39 _SIGEMT = 0x7 40 _SIGFPE = 0x8 41 _SIGKILL = 0x9 42 _SIGBUS = 0xa 43 _SIGSEGV = 0xb 44 _SIGSYS = 0xc 45 _SIGPIPE = 0xd 46 _SIGALRM = 0xe 47 _SIGTERM = 0xf 48 _SIGURG = 0x15 49 _SIGSTOP = 0x17 50 _SIGTSTP = 0x18 51 _SIGCONT = 0x19 52 _SIGCHLD = 0x12 53 _SIGTTIN = 0x1a 54 _SIGTTOU = 0x1b 55 _SIGIO = 0x16 56 _SIGXCPU = 0x1e 57 _SIGXFSZ = 0x1f 58 _SIGVTALRM = 0x1c 59 _SIGPROF = 0x1d 60 _SIGWINCH = 0x14 61 _SIGUSR1 = 0x10 62 _SIGUSR2 = 0x11 63 64 _FPE_INTDIV = 0x1 65 _FPE_INTOVF = 0x2 66 _FPE_FLTDIV = 0x3 67 _FPE_FLTOVF = 0x4 68 _FPE_FLTUND = 0x5 69 _FPE_FLTRES = 0x6 70 _FPE_FLTINV = 0x7 71 _FPE_FLTSUB = 0x8 72 73 _BUS_ADRALN = 0x1 74 _BUS_ADRERR = 0x2 75 _BUS_OBJERR = 0x3 76 77 _SEGV_MAPERR = 0x1 78 _SEGV_ACCERR = 0x2 79 80 _ITIMER_REAL = 0x0 81 _ITIMER_VIRTUAL = 0x1 82 _ITIMER_PROF = 0x2 83 84 __SC_PAGESIZE = 0xb 85 __SC_NPROCESSORS_ONLN = 0xf 86 87 _PTHREAD_CREATE_DETACHED = 0x40 88 89 _FORK_NOSIGCHLD = 0x1 90 _FORK_WAITPID = 0x2 91 92 _MAXHOSTNAMELEN = 0x100 93 94 _O_NONBLOCK = 0x80 95 _O_CLOEXEC = 0x800000 96 _FD_CLOEXEC = 0x1 97 _F_GETFL = 0x3 98 _F_SETFL = 0x4 99 _F_SETFD = 0x2 100 101 _POLLIN = 0x1 102 _POLLOUT = 0x4 103 _POLLHUP = 0x10 104 _POLLERR = 0x8 105 106 _PORT_SOURCE_FD = 0x4 107 _PORT_SOURCE_ALERT = 0x5 108 _PORT_ALERT_UPDATE = 0x2 109 ) 110 111 type semt struct { 112 sem_count uint32 113 sem_type uint16 114 sem_magic uint16 115 sem_pad1 [3]uint64 116 sem_pad2 [2]uint64 117 } 118 119 type sigset struct { 120 __sigbits [4]uint32 121 } 122 123 type stackt struct { 124 ss_sp *byte 125 ss_size uintptr 126 ss_flags int32 127 pad_cgo_0 [4]byte 128 } 129 130 type siginfo struct { 131 si_signo int32 132 si_code int32 133 si_errno int32 134 si_pad int32 135 __data [240]byte 136 } 137 138 type sigactiont struct { 139 sa_flags int32 140 pad_cgo_0 [4]byte 141 _funcptr [8]byte 142 sa_mask sigset 143 } 144 145 type fpregset struct { 146 fp_reg_set [528]byte 147 } 148 149 type mcontext struct { 150 gregs [28]int64 151 fpregs fpregset 152 } 153 154 type ucontext struct { 155 uc_flags uint64 156 uc_link *ucontext 157 uc_sigmask sigset 158 uc_stack stackt 159 pad_cgo_0 [8]byte 160 uc_mcontext mcontext 161 uc_filler [5]int64 162 pad_cgo_1 [8]byte 163 } 164 165 type timespec struct { 166 tv_sec int64 167 tv_nsec int64 168 } 169 170 //go:nosplit 171 func (ts *timespec) setNsec(ns int64) { 172 ts.tv_sec = ns / 1e9 173 ts.tv_nsec = ns % 1e9 174 } 175 176 type timeval struct { 177 tv_sec int64 178 tv_usec int64 179 } 180 181 func (tv *timeval) set_usec(x int32) { 182 tv.tv_usec = int64(x) 183 } 184 185 type itimerval struct { 186 it_interval timeval 187 it_value timeval 188 } 189 190 type portevent struct { 191 portev_events int32 192 portev_source uint16 193 portev_pad uint16 194 portev_object uint64 195 portev_user *byte 196 } 197 198 type pthread uint32 199 type pthreadattr struct { 200 __pthread_attrp *byte 201 } 202 203 type stat struct { 204 st_dev uint64 205 st_ino uint64 206 st_mode uint32 207 st_nlink uint32 208 st_uid uint32 209 st_gid uint32 210 st_rdev uint64 211 st_size int64 212 st_atim timespec 213 st_mtim timespec 214 st_ctim timespec 215 st_blksize int32 216 pad_cgo_0 [4]byte 217 st_blocks int64 218 st_fstype [16]int8 219 } 220 221 // created by cgo -cdefs and then converted to Go 222 // cgo -cdefs defs_solaris.go defs_solaris_amd64.go 223 224 const ( 225 _REG_RDI = 0x8 226 _REG_RSI = 0x9 227 _REG_RDX = 0xc 228 _REG_RCX = 0xd 229 _REG_R8 = 0x7 230 _REG_R9 = 0x6 231 _REG_R10 = 0x5 232 _REG_R11 = 0x4 233 _REG_R12 = 0x3 234 _REG_R13 = 0x2 235 _REG_R14 = 0x1 236 _REG_R15 = 0x0 237 _REG_RBP = 0xa 238 _REG_RBX = 0xb 239 _REG_RAX = 0xe 240 _REG_GS = 0x17 241 _REG_FS = 0x16 242 _REG_ES = 0x18 243 _REG_DS = 0x19 244 _REG_TRAPNO = 0xf 245 _REG_ERR = 0x10 246 _REG_RIP = 0x11 247 _REG_CS = 0x12 248 _REG_RFLAGS = 0x13 249 _REG_RSP = 0x14 250 _REG_SS = 0x15 251 )