...
Source file
src/runtime/defs_linux_arm.go
Documentation: runtime
1
2
3
4
5 package runtime
6
7 import "unsafe"
8
9
10 const (
11 _EINTR = 0x4
12 _ENOMEM = 0xc
13 _EAGAIN = 0xb
14 _ENOSYS = 0x26
15
16 _PROT_NONE = 0
17 _PROT_READ = 0x1
18 _PROT_WRITE = 0x2
19 _PROT_EXEC = 0x4
20
21 _MAP_ANON = 0x20
22 _MAP_PRIVATE = 0x2
23 _MAP_FIXED = 0x10
24
25 _MADV_DONTNEED = 0x4
26 _MADV_FREE = 0x8
27 _MADV_HUGEPAGE = 0xe
28 _MADV_NOHUGEPAGE = 0xf
29 _MADV_COLLAPSE = 0x19
30
31 _SA_RESTART = 0x10000000
32 _SA_ONSTACK = 0x8000000
33 _SA_RESTORER = 0
34 _SA_SIGINFO = 0x4
35 _SI_KERNEL = 0x80
36 _SI_TIMER = -0x2
37 _SIGHUP = 0x1
38 _SIGINT = 0x2
39 _SIGQUIT = 0x3
40 _SIGILL = 0x4
41 _SIGTRAP = 0x5
42 _SIGABRT = 0x6
43 _SIGBUS = 0x7
44 _SIGFPE = 0x8
45 _SIGKILL = 0x9
46 _SIGUSR1 = 0xa
47 _SIGSEGV = 0xb
48 _SIGUSR2 = 0xc
49 _SIGPIPE = 0xd
50 _SIGALRM = 0xe
51 _SIGSTKFLT = 0x10
52 _SIGCHLD = 0x11
53 _SIGCONT = 0x12
54 _SIGSTOP = 0x13
55 _SIGTSTP = 0x14
56 _SIGTTIN = 0x15
57 _SIGTTOU = 0x16
58 _SIGURG = 0x17
59 _SIGXCPU = 0x18
60 _SIGXFSZ = 0x19
61 _SIGVTALRM = 0x1a
62 _SIGPROF = 0x1b
63 _SIGWINCH = 0x1c
64 _SIGIO = 0x1d
65 _SIGPWR = 0x1e
66 _SIGSYS = 0x1f
67 _SIGRTMIN = 0x20
68 _FPE_INTDIV = 0x1
69 _FPE_INTOVF = 0x2
70 _FPE_FLTDIV = 0x3
71 _FPE_FLTOVF = 0x4
72 _FPE_FLTUND = 0x5
73 _FPE_FLTRES = 0x6
74 _FPE_FLTINV = 0x7
75 _FPE_FLTSUB = 0x8
76 _BUS_ADRALN = 0x1
77 _BUS_ADRERR = 0x2
78 _BUS_OBJERR = 0x3
79 _SEGV_MAPERR = 0x1
80 _SEGV_ACCERR = 0x2
81 _ITIMER_REAL = 0
82 _ITIMER_PROF = 0x2
83 _ITIMER_VIRTUAL = 0x1
84 _O_RDONLY = 0
85 _O_WRONLY = 0x1
86 _O_CREAT = 0x40
87 _O_TRUNC = 0x200
88 _O_NONBLOCK = 0x800
89 _O_CLOEXEC = 0x80000
90
91 _CLOCK_THREAD_CPUTIME_ID = 0x3
92
93 _SIGEV_THREAD_ID = 0x4
94
95 _AF_UNIX = 0x1
96 _SOCK_DGRAM = 0x2
97 )
98
99
100
101 type timespec32 struct {
102 tv_sec int32
103 tv_nsec int32
104 }
105
106
107 func (ts *timespec32) setNsec(ns int64) {
108 ts.tv_sec = int32(ns / 1e9)
109 ts.tv_nsec = int32(ns % 1e9)
110 }
111
112 type timespec struct {
113 tv_sec int64
114 tv_nsec int32
115 _ [4]byte
116 }
117
118
119 func (ts *timespec) setNsec(ns int64) {
120 ts.tv_sec = ns / 1e9
121 ts.tv_nsec = int32(ns % 1e9)
122 }
123
124 type stackt struct {
125 ss_sp *byte
126 ss_flags int32
127 ss_size uintptr
128 }
129
130 type sigcontext struct {
131 trap_no uint32
132 error_code uint32
133 oldmask uint32
134 r0 uint32
135 r1 uint32
136 r2 uint32
137 r3 uint32
138 r4 uint32
139 r5 uint32
140 r6 uint32
141 r7 uint32
142 r8 uint32
143 r9 uint32
144 r10 uint32
145 fp uint32
146 ip uint32
147 sp uint32
148 lr uint32
149 pc uint32
150 cpsr uint32
151 fault_address uint32
152 }
153
154 type ucontext struct {
155 uc_flags uint32
156 uc_link *ucontext
157 uc_stack stackt
158 uc_mcontext sigcontext
159 uc_sigmask uint32
160 __unused [31]int32
161 uc_regspace [128]uint32
162 }
163
164 type timeval struct {
165 tv_sec int32
166 tv_usec int32
167 }
168
169 func (tv *timeval) set_usec(x int32) {
170 tv.tv_usec = x
171 }
172
173 type itimerspec32 struct {
174 it_interval timespec32
175 it_value timespec32
176 }
177
178 type itimerspec struct {
179 it_interval timespec
180 it_value timespec
181 }
182
183 type itimerval struct {
184 it_interval timeval
185 it_value timeval
186 }
187
188 type sigeventFields struct {
189 value uintptr
190 signo int32
191 notify int32
192
193 sigev_notify_thread_id int32
194 }
195
196 type sigevent struct {
197 sigeventFields
198
199
200 _ [_sigev_max_size - unsafe.Sizeof(sigeventFields{})]byte
201 }
202
203 type siginfoFields struct {
204 si_signo int32
205 si_errno int32
206 si_code int32
207
208 si_addr uint32
209 }
210
211 type siginfo struct {
212 siginfoFields
213
214
215 _ [_si_max_size - unsafe.Sizeof(siginfoFields{})]byte
216 }
217
218 type sigactiont struct {
219 sa_handler uintptr
220 sa_flags uint32
221 sa_restorer uintptr
222 sa_mask uint64
223 }
224
225 type sockaddr_un struct {
226 family uint16
227 path [108]byte
228 }
229
View as plain text