1 // Created by cgo -cdefs and converted (by hand) to Go
2 // ../cmd/cgo/cgo -cdefs defs_linux.go defs1_linux.go defs2_linux.go
25 _MADV_NOHUGEPAGE = 0xf
28 _SA_RESTART = 0x10000000
29 _SA_ONSTACK = 0x8000000
30 _SA_RESTORER = 0x0 // Only used on intel
89 _CLOCK_THREAD_CPUTIME_ID = 0x3
91 _SIGEV_THREAD_ID = 0x4
97 type timespec struct {
103 func (ts *timespec) setNsec(ns int64) {
105 ts.tv_nsec = ns % 1e9
108 type timeval struct {
113 func (tv *timeval) set_usec(x int32) {
114 tv.tv_usec = int64(x)
117 type sigactiont struct {
124 type siginfoFields struct {
128 // below here is a union; si_addr is the only field we use
132 type siginfo struct {
135 // Pad struct to the max size in the kernel.
136 _ [_si_max_size - unsafe.Sizeof(siginfoFields{})]byte
139 type itimerspec struct {
144 type itimerval struct {
149 type sigeventFields struct {
153 // below here is a union; sigev_notify_thread_id is the only field we use
154 sigev_notify_thread_id int32
157 type sigevent struct {
160 // Pad struct to the max size in the kernel.
161 _ [_sigev_max_size - unsafe.Sizeof(sigeventFields{})]byte
164 // Created by cgo -cdefs and then converted to Go by hand
165 // ../cmd/cgo/cgo -cdefs defs_linux.go defs1_linux.go defs2_linux.go
176 type usigset struct {
187 type sigcontext struct {
189 /* AArch64 registers */
194 _pad [8]byte // __attribute__((__aligned__(16)))
195 __reserved [4096]byte
198 type sockaddr_un struct {
203 type ucontext struct {
208 _pad [(1024 - 64) / 8]byte
209 _pad2 [8]byte // sigcontext must be aligned to 16-byte
210 uc_mcontext sigcontext