1 // created by cgo -cdefs and then converted to Go
2 // cgo -cdefs defs_linux.go defs3_linux.go
25 _MADV_NOHUGEPAGE = 0xf
28 _SA_RESTART = 0x10000000
29 _SA_ONSTACK = 0x8000000
88 _CLOCK_THREAD_CPUTIME_ID = 0x3
90 _SIGEV_THREAD_ID = 0x4
96 //typedef uint64 Sigset;
98 type timespec struct {
104 func (ts *timespec) setNsec(ns int64) {
106 ts.tv_nsec = ns % 1e9
109 type timeval struct {
114 func (tv *timeval) set_usec(x int32) {
115 tv.tv_usec = int64(x)
118 type sigactiont struct {
125 type siginfoFields struct {
129 // below here is a union; si_addr is the only field we use
133 type siginfo struct {
136 // Pad struct to the max size in the kernel.
137 _ [_si_max_size - unsafe.Sizeof(siginfoFields{})]byte
140 type itimerspec struct {
145 type itimerval struct {
150 type sigeventFields struct {
154 // below here is a union; sigev_notify_thread_id is the only field we use
155 sigev_notify_thread_id int32
158 type sigevent struct {
161 // Pad struct to the max size in the kernel.
162 _ [_sigev_max_size - unsafe.Sizeof(sigeventFields{})]byte
165 // created by cgo -cdefs and then converted to Go
166 // cgo -cdefs defs_linux.go defs3_linux.go
205 type sigcontext struct {
215 vmx_reserve [101]int64
218 type ucontext struct {
224 uc_mcontext sigcontext