github.com/lzhfromustc/gofuzz@v0.0.0-20211116160056-151b3108bbd1/runtime/defs_linux_arm.go (about) 1 // Copyright 2014 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 // Constants 8 const ( 9 _EINTR = 0x4 10 _ENOMEM = 0xc 11 _EAGAIN = 0xb 12 _ENOSYS = 0x26 13 14 _PROT_NONE = 0 15 _PROT_READ = 0x1 16 _PROT_WRITE = 0x2 17 _PROT_EXEC = 0x4 18 19 _MAP_ANON = 0x20 20 _MAP_PRIVATE = 0x2 21 _MAP_FIXED = 0x10 22 23 _MADV_DONTNEED = 0x4 24 _MADV_FREE = 0x8 25 _MADV_HUGEPAGE = 0xe 26 _MADV_NOHUGEPAGE = 0xf 27 28 _SA_RESTART = 0x10000000 29 _SA_ONSTACK = 0x8000000 30 _SA_RESTORER = 0 // unused on ARM 31 _SA_SIGINFO = 0x4 32 _SIGHUP = 0x1 33 _SIGINT = 0x2 34 _SIGQUIT = 0x3 35 _SIGILL = 0x4 36 _SIGTRAP = 0x5 37 _SIGABRT = 0x6 38 _SIGBUS = 0x7 39 _SIGFPE = 0x8 40 _SIGKILL = 0x9 41 _SIGUSR1 = 0xa 42 _SIGSEGV = 0xb 43 _SIGUSR2 = 0xc 44 _SIGPIPE = 0xd 45 _SIGALRM = 0xe 46 _SIGSTKFLT = 0x10 47 _SIGCHLD = 0x11 48 _SIGCONT = 0x12 49 _SIGSTOP = 0x13 50 _SIGTSTP = 0x14 51 _SIGTTIN = 0x15 52 _SIGTTOU = 0x16 53 _SIGURG = 0x17 54 _SIGXCPU = 0x18 55 _SIGXFSZ = 0x19 56 _SIGVTALRM = 0x1a 57 _SIGPROF = 0x1b 58 _SIGWINCH = 0x1c 59 _SIGIO = 0x1d 60 _SIGPWR = 0x1e 61 _SIGSYS = 0x1f 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 _BUS_ADRALN = 0x1 71 _BUS_ADRERR = 0x2 72 _BUS_OBJERR = 0x3 73 _SEGV_MAPERR = 0x1 74 _SEGV_ACCERR = 0x2 75 _ITIMER_REAL = 0 76 _ITIMER_PROF = 0x2 77 _ITIMER_VIRTUAL = 0x1 78 _O_RDONLY = 0 79 _O_NONBLOCK = 0x800 80 _O_CLOEXEC = 0x80000 81 82 _EPOLLIN = 0x1 83 _EPOLLOUT = 0x4 84 _EPOLLERR = 0x8 85 _EPOLLHUP = 0x10 86 _EPOLLRDHUP = 0x2000 87 _EPOLLET = 0x80000000 88 _EPOLL_CLOEXEC = 0x80000 89 _EPOLL_CTL_ADD = 0x1 90 _EPOLL_CTL_DEL = 0x2 91 _EPOLL_CTL_MOD = 0x3 92 93 _AF_UNIX = 0x1 94 _SOCK_DGRAM = 0x2 95 ) 96 97 type timespec struct { 98 tv_sec int32 99 tv_nsec int32 100 } 101 102 //go:nosplit 103 func (ts *timespec) setNsec(ns int64) { 104 ts.tv_sec = timediv(ns, 1e9, &ts.tv_nsec) 105 } 106 107 type stackt struct { 108 ss_sp *byte 109 ss_flags int32 110 ss_size uintptr 111 } 112 113 type sigcontext struct { 114 trap_no uint32 115 error_code uint32 116 oldmask uint32 117 r0 uint32 118 r1 uint32 119 r2 uint32 120 r3 uint32 121 r4 uint32 122 r5 uint32 123 r6 uint32 124 r7 uint32 125 r8 uint32 126 r9 uint32 127 r10 uint32 128 fp uint32 129 ip uint32 130 sp uint32 131 lr uint32 132 pc uint32 133 cpsr uint32 134 fault_address uint32 135 } 136 137 type ucontext struct { 138 uc_flags uint32 139 uc_link *ucontext 140 uc_stack stackt 141 uc_mcontext sigcontext 142 uc_sigmask uint32 143 __unused [31]int32 144 uc_regspace [128]uint32 145 } 146 147 type timeval struct { 148 tv_sec int32 149 tv_usec int32 150 } 151 152 func (tv *timeval) set_usec(x int32) { 153 tv.tv_usec = x 154 } 155 156 type itimerval struct { 157 it_interval timeval 158 it_value timeval 159 } 160 161 type siginfo struct { 162 si_signo int32 163 si_errno int32 164 si_code int32 165 // below here is a union; si_addr is the only field we use 166 si_addr uint32 167 } 168 169 type sigactiont struct { 170 sa_handler uintptr 171 sa_flags uint32 172 sa_restorer uintptr 173 sa_mask uint64 174 } 175 176 type epollevent struct { 177 events uint32 178 _pad uint32 179 data [8]byte // to match amd64 180 } 181 182 type sockaddr_un struct { 183 family uint16 184 path [108]byte 185 }