1package runtime 2 3import "unsafe" 4 5const ( 6 _EINTR = 0x4 7 _EFAULT = 0xe 8 _EAGAIN = 0x23 9 _ENOSYS = 0x4e 10 11 _O_NONBLOCK = 0x4 12 _O_CLOEXEC = 0x10000 13 14 _PROT_NONE = 0x0 15 _PROT_READ = 0x1 16 _PROT_WRITE = 0x2 17 _PROT_EXEC = 0x4 18 19 _MAP_ANON = 0x1000 20 _MAP_PRIVATE = 0x2 21 _MAP_FIXED = 0x10 22 _MAP_STACK = 0x4000 23 24 _MADV_FREE = 0x6 25 26 _SA_SIGINFO = 0x40 27 _SA_RESTART = 0x2 28 _SA_ONSTACK = 0x1 29 30 _SIGHUP = 0x1 31 _SIGINT = 0x2 32 _SIGQUIT = 0x3 33 _SIGILL = 0x4 34 _SIGTRAP = 0x5 35 _SIGABRT = 0x6 36 _SIGEMT = 0x7 37 _SIGFPE = 0x8 38 _SIGKILL = 0x9 39 _SIGBUS = 0xa 40 _SIGSEGV = 0xb 41 _SIGSYS = 0xc 42 _SIGPIPE = 0xd 43 _SIGALRM = 0xe 44 _SIGTERM = 0xf 45 _SIGURG = 0x10 46 _SIGSTOP = 0x11 47 _SIGTSTP = 0x12 48 _SIGCONT = 0x13 49 _SIGCHLD = 0x14 50 _SIGTTIN = 0x15 51 _SIGTTOU = 0x16 52 _SIGIO = 0x17 53 _SIGXCPU = 0x18 54 _SIGXFSZ = 0x19 55 _SIGVTALRM = 0x1a 56 _SIGPROF = 0x1b 57 _SIGWINCH = 0x1c 58 _SIGINFO = 0x1d 59 _SIGUSR1 = 0x1e 60 _SIGUSR2 = 0x1f 61 62 _FPE_INTDIV = 0x1 63 _FPE_INTOVF = 0x2 64 _FPE_FLTDIV = 0x3 65 _FPE_FLTOVF = 0x4 66 _FPE_FLTUND = 0x5 67 _FPE_FLTRES = 0x6 68 _FPE_FLTINV = 0x7 69 _FPE_FLTSUB = 0x8 70 71 _BUS_ADRALN = 0x1 72 _BUS_ADRERR = 0x2 73 _BUS_OBJERR = 0x3 74 75 _SEGV_MAPERR = 0x1 76 _SEGV_ACCERR = 0x2 77 78 _ITIMER_REAL = 0x0 79 _ITIMER_VIRTUAL = 0x1 80 _ITIMER_PROF = 0x2 81 82 _EV_ADD = 0x1 83 _EV_DELETE = 0x2 84 _EV_CLEAR = 0x20 85 _EV_ERROR = 0x4000 86 _EV_EOF = 0x8000 87 _EVFILT_READ = -0x1 88 _EVFILT_WRITE = -0x2 89) 90 91type tforkt struct { 92 tf_tcb unsafe.Pointer 93 tf_tid *int32 94 tf_stack uintptr 95} 96 97type sigcontext struct { 98 __sc_unused int32 99 sc_mask int32 100 sc_sp uintptr 101 sc_lr uintptr 102 sc_elr uintptr 103 sc_spsr uintptr 104 sc_x [30]uintptr 105 sc_cookie int64 106} 107 108type siginfo struct { 109 si_signo int32 110 si_code int32 111 si_errno int32 112 pad_cgo_0 [4]byte 113 _data [120]byte 114} 115 116type stackt struct { 117 ss_sp uintptr 118 ss_size uintptr 119 ss_flags int32 120 pad_cgo_0 [4]byte 121} 122 123type timespec struct { 124 tv_sec int64 125 tv_nsec int64 126} 127 128//go:nosplit 129func (ts *timespec) setNsec(ns int64) { 130 ts.tv_sec = ns / 1e9 131 ts.tv_nsec = ns % 1e9 132} 133 134type timeval struct { 135 tv_sec int64 136 tv_usec int64 137} 138 139func (tv *timeval) set_usec(x int32) { 140 tv.tv_usec = int64(x) 141} 142 143type itimerval struct { 144 it_interval timeval 145 it_value timeval 146} 147 148type keventt struct { 149 ident uint64 150 filter int16 151 flags uint16 152 fflags uint32 153 data int64 154 udata *byte 155} 156