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