1 // Copyright 2016 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.
5 //go:build (mips || mipsle) && linux
28 _MADV_NOHUGEPAGE = 0xf
31 _SA_RESTART = 0x10000000
32 _SA_ONSTACK = 0x8000000
91 _CLOCK_THREAD_CPUTIME_ID = 0x3
93 _SIGEV_THREAD_ID = 0x4
96 type timespec struct {
102 func (ts *timespec) setNsec(ns int64) {
103 ts.tv_sec = timediv(ns, 1e9, &ts.tv_nsec)
106 type timeval struct {
112 func (tv *timeval) set_usec(x int32) {
116 type sigactiont struct {
120 // linux header does not have sa_restorer field,
121 // but it is used in setsig(). it is no harm to put it here
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
181 type sigcontext struct {
202 type ucontext struct {
207 uc_mcontext sigcontext