Source file
src/runtime/defs_linux_riscv64.go
Documentation: runtime
1
2
3
4
5 package runtime
6
7 const (
8 _EINTR = 0x4
9 _EAGAIN = 0xb
10 _ENOMEM = 0xc
11 _ENOSYS = 0x26
12
13 _PROT_NONE = 0x0
14 _PROT_READ = 0x1
15 _PROT_WRITE = 0x2
16 _PROT_EXEC = 0x4
17
18 _MAP_ANON = 0x20
19 _MAP_PRIVATE = 0x2
20 _MAP_FIXED = 0x10
21
22 _MADV_DONTNEED = 0x4
23 _MADV_FREE = 0x8
24 _MADV_HUGEPAGE = 0xe
25 _MADV_NOHUGEPAGE = 0xf
26
27 _SA_RESTART = 0x10000000
28 _SA_ONSTACK = 0x8000000
29 _SA_RESTORER = 0x0
30 _SA_SIGINFO = 0x4
31
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
63 _FPE_INTDIV = 0x1
64 _FPE_INTOVF = 0x2
65 _FPE_FLTDIV = 0x3
66 _FPE_FLTOVF = 0x4
67 _FPE_FLTUND = 0x5
68 _FPE_FLTRES = 0x6
69 _FPE_FLTINV = 0x7
70 _FPE_FLTSUB = 0x8
71
72 _BUS_ADRALN = 0x1
73 _BUS_ADRERR = 0x2
74 _BUS_OBJERR = 0x3
75
76 _SEGV_MAPERR = 0x1
77 _SEGV_ACCERR = 0x2
78
79 _ITIMER_REAL = 0x0
80 _ITIMER_VIRTUAL = 0x1
81 _ITIMER_PROF = 0x2
82
83 _EPOLLIN = 0x1
84 _EPOLLOUT = 0x4
85 _EPOLLERR = 0x8
86 _EPOLLHUP = 0x10
87 _EPOLLRDHUP = 0x2000
88 _EPOLLET = 0x80000000
89 _EPOLL_CLOEXEC = 0x80000
90 _EPOLL_CTL_ADD = 0x1
91 _EPOLL_CTL_DEL = 0x2
92 _EPOLL_CTL_MOD = 0x3
93 )
94
95 type timespec struct {
96 tv_sec int64
97 tv_nsec int64
98 }
99
100
101 func (ts *timespec) setNsec(ns int64) {
102 ts.tv_sec = ns / 1e9
103 ts.tv_nsec = ns % 1e9
104 }
105
106 type timeval struct {
107 tv_sec int64
108 tv_usec int64
109 }
110
111 func (tv *timeval) set_usec(x int32) {
112 tv.tv_usec = int64(x)
113 }
114
115 type sigactiont struct {
116 sa_handler uintptr
117 sa_flags uint64
118 sa_restorer uintptr
119 sa_mask uint64
120 }
121
122 type siginfo struct {
123 si_signo int32
124 si_errno int32
125 si_code int32
126
127 si_addr uint64
128 }
129
130 type itimerval struct {
131 it_interval timeval
132 it_value timeval
133 }
134
135 type epollevent struct {
136 events uint32
137 pad_cgo_0 [4]byte
138 data [8]byte
139 }
140
141 const (
142 _O_RDONLY = 0x0
143 _O_NONBLOCK = 0x800
144 _O_CLOEXEC = 0x80000
145 )
146
147 type user_regs_struct struct {
148 pc uint64
149 ra uint64
150 sp uint64
151 gp uint64
152 tp uint64
153 t0 uint64
154 t1 uint64
155 t2 uint64
156 s0 uint64
157 s1 uint64
158 a0 uint64
159 a1 uint64
160 a2 uint64
161 a3 uint64
162 a4 uint64
163 a5 uint64
164 a6 uint64
165 a7 uint64
166 s2 uint64
167 s3 uint64
168 s4 uint64
169 s5 uint64
170 s6 uint64
171 s7 uint64
172 s8 uint64
173 s9 uint64
174 s10 uint64
175 s11 uint64
176 t3 uint64
177 t4 uint64
178 t5 uint64
179 t6 uint64
180 }
181
182 type user_fpregs_struct struct {
183 f [528]byte
184 }
185
186 type usigset struct {
187 us_x__val [16]uint64
188 }
189
190 type sigcontext struct {
191 sc_regs user_regs_struct
192 sc_fpregs user_fpregs_struct
193 }
194
195 type stackt struct {
196 ss_sp *byte
197 ss_flags int32
198 ss_size uintptr
199 }
200
201 type ucontext struct {
202 uc_flags uint64
203 uc_link *ucontext
204 uc_stack stackt
205 uc_sigmask usigset
206 uc_x__unused [0]uint8
207 uc_pad_cgo_0 [8]byte
208 uc_mcontext sigcontext
209 }
210
View as plain text