github.com/aloncn/graphics-go@v0.0.1/src/runtime/defs_linux_ppc64.go (about) 1 // created by cgo -cdefs and then converted to Go 2 // cgo -cdefs defs_linux.go defs3_linux.go 3 4 package runtime 5 6 const ( 7 _EINTR = 0x4 8 _EAGAIN = 0xb 9 _ENOMEM = 0xc 10 11 _PROT_NONE = 0x0 12 _PROT_READ = 0x1 13 _PROT_WRITE = 0x2 14 _PROT_EXEC = 0x4 15 16 _MAP_ANON = 0x20 17 _MAP_PRIVATE = 0x2 18 _MAP_FIXED = 0x10 19 20 _MADV_DONTNEED = 0x4 21 _MADV_HUGEPAGE = 0xe 22 _MADV_NOHUGEPAGE = 0xf 23 24 _SA_RESTART = 0x10000000 25 _SA_ONSTACK = 0x8000000 26 _SA_SIGINFO = 0x4 27 28 _SIGHUP = 0x1 29 _SIGINT = 0x2 30 _SIGQUIT = 0x3 31 _SIGILL = 0x4 32 _SIGTRAP = 0x5 33 _SIGABRT = 0x6 34 _SIGBUS = 0x7 35 _SIGFPE = 0x8 36 _SIGKILL = 0x9 37 _SIGUSR1 = 0xa 38 _SIGSEGV = 0xb 39 _SIGUSR2 = 0xc 40 _SIGPIPE = 0xd 41 _SIGALRM = 0xe 42 _SIGSTKFLT = 0x10 43 _SIGCHLD = 0x11 44 _SIGCONT = 0x12 45 _SIGSTOP = 0x13 46 _SIGTSTP = 0x14 47 _SIGTTIN = 0x15 48 _SIGTTOU = 0x16 49 _SIGURG = 0x17 50 _SIGXCPU = 0x18 51 _SIGXFSZ = 0x19 52 _SIGVTALRM = 0x1a 53 _SIGPROF = 0x1b 54 _SIGWINCH = 0x1c 55 _SIGIO = 0x1d 56 _SIGPWR = 0x1e 57 _SIGSYS = 0x1f 58 59 _FPE_INTDIV = 0x1 60 _FPE_INTOVF = 0x2 61 _FPE_FLTDIV = 0x3 62 _FPE_FLTOVF = 0x4 63 _FPE_FLTUND = 0x5 64 _FPE_FLTRES = 0x6 65 _FPE_FLTINV = 0x7 66 _FPE_FLTSUB = 0x8 67 68 _BUS_ADRALN = 0x1 69 _BUS_ADRERR = 0x2 70 _BUS_OBJERR = 0x3 71 72 _SEGV_MAPERR = 0x1 73 _SEGV_ACCERR = 0x2 74 75 _ITIMER_REAL = 0x0 76 _ITIMER_VIRTUAL = 0x1 77 _ITIMER_PROF = 0x2 78 79 _EPOLLIN = 0x1 80 _EPOLLOUT = 0x4 81 _EPOLLERR = 0x8 82 _EPOLLHUP = 0x10 83 _EPOLLRDHUP = 0x2000 84 _EPOLLET = 0x80000000 85 _EPOLL_CLOEXEC = 0x80000 86 _EPOLL_CTL_ADD = 0x1 87 _EPOLL_CTL_DEL = 0x2 88 _EPOLL_CTL_MOD = 0x3 89 ) 90 91 //struct Sigset { 92 // uint64 sig[1]; 93 //}; 94 //typedef uint64 Sigset; 95 96 type timespec struct { 97 tv_sec int64 98 tv_nsec int64 99 } 100 101 func (ts *timespec) set_sec(x int64) { 102 ts.tv_sec = x 103 } 104 105 func (ts *timespec) set_nsec(x int32) { 106 ts.tv_nsec = int64(x) 107 } 108 109 type timeval struct { 110 tv_sec int64 111 tv_usec int64 112 } 113 114 func (tv *timeval) set_usec(x int32) { 115 tv.tv_usec = int64(x) 116 } 117 118 type sigactiont struct { 119 sa_handler uintptr 120 sa_flags uint64 121 sa_restorer uintptr 122 sa_mask uint64 123 } 124 125 type siginfo struct { 126 si_signo int32 127 si_errno int32 128 si_code int32 129 // below here is a union; si_addr is the only field we use 130 si_addr uint64 131 } 132 133 type itimerval struct { 134 it_interval timeval 135 it_value timeval 136 } 137 138 type epollevent struct { 139 events uint32 140 pad_cgo_0 [4]byte 141 data [8]byte // unaligned uintptr 142 } 143 144 // created by cgo -cdefs and then converted to Go 145 // cgo -cdefs defs_linux.go defs3_linux.go 146 147 const ( 148 _O_RDONLY = 0x0 149 _O_CLOEXEC = 0x80000 150 _SA_RESTORER = 0 151 ) 152 153 type ptregs struct { 154 gpr [32]uint64 155 nip uint64 156 msr uint64 157 orig_gpr3 uint64 158 ctr uint64 159 link uint64 160 xer uint64 161 ccr uint64 162 softe uint64 163 trap uint64 164 dar uint64 165 dsisr uint64 166 result uint64 167 } 168 169 type vreg struct { 170 u [4]uint32 171 } 172 173 type sigaltstackt struct { 174 ss_sp *byte 175 ss_flags int32 176 pad_cgo_0 [4]byte 177 ss_size uintptr 178 } 179 180 type sigcontext struct { 181 _unused [4]uint64 182 signal int32 183 _pad0 int32 184 handler uint64 185 oldmask uint64 186 regs *ptregs 187 gp_regs [48]uint64 188 fp_regs [33]float64 189 v_regs *vreg 190 vmx_reserve [101]int64 191 } 192 193 type ucontext struct { 194 uc_flags uint64 195 uc_link *ucontext 196 uc_stack sigaltstackt 197 uc_sigmask uint64 198 __unused [15]uint64 199 uc_mcontext sigcontext 200 }