github.com/x04/go/src@v0.0.0-20200202162449-3d481ceb3525/runtime/defs_linux_mips64x.go (about)

     1  // +build mips64 mips64le
     2  // +build linux
     3  
     4  package runtime
     5  
     6  const (
     7  	_EINTR	= 0x4
     8  	_EAGAIN	= 0xb
     9  	_ENOMEM	= 0xc
    10  	_ENOSYS	= 0x59
    11  
    12  	_PROT_NONE	= 0x0
    13  	_PROT_READ	= 0x1
    14  	_PROT_WRITE	= 0x2
    15  	_PROT_EXEC	= 0x4
    16  
    17  	_MAP_ANON	= 0x800
    18  	_MAP_PRIVATE	= 0x2
    19  	_MAP_FIXED	= 0x10
    20  
    21  	_MADV_DONTNEED		= 0x4
    22  	_MADV_FREE		= 0x8
    23  	_MADV_HUGEPAGE		= 0xe
    24  	_MADV_NOHUGEPAGE	= 0xf
    25  
    26  	_SA_RESTART	= 0x10000000
    27  	_SA_ONSTACK	= 0x8000000
    28  	_SA_SIGINFO	= 0x8
    29  
    30  	_SIGHUP		= 0x1
    31  	_SIGINT		= 0x2
    32  	_SIGQUIT	= 0x3
    33  	_SIGILL		= 0x4
    34  	_SIGTRAP	= 0x5
    35  	_SIGABRT	= 0x6
    36  	_SIGEMT		= 0x7
    37  	_SIGFPE		= 0x8
    38  	_SIGKILL	= 0x9
    39  	_SIGBUS		= 0xa
    40  	_SIGSEGV	= 0xb
    41  	_SIGSYS		= 0xc
    42  	_SIGPIPE	= 0xd
    43  	_SIGALRM	= 0xe
    44  	_SIGUSR1	= 0x10
    45  	_SIGUSR2	= 0x11
    46  	_SIGCHLD	= 0x12
    47  	_SIGPWR		= 0x13
    48  	_SIGWINCH	= 0x14
    49  	_SIGURG		= 0x15
    50  	_SIGIO		= 0x16
    51  	_SIGSTOP	= 0x17
    52  	_SIGTSTP	= 0x18
    53  	_SIGCONT	= 0x19
    54  	_SIGTTIN	= 0x1a
    55  	_SIGTTOU	= 0x1b
    56  	_SIGVTALRM	= 0x1c
    57  	_SIGPROF	= 0x1d
    58  	_SIGXCPU	= 0x1e
    59  	_SIGXFSZ	= 0x1f
    60  
    61  	_FPE_INTDIV	= 0x1
    62  	_FPE_INTOVF	= 0x2
    63  	_FPE_FLTDIV	= 0x3
    64  	_FPE_FLTOVF	= 0x4
    65  	_FPE_FLTUND	= 0x5
    66  	_FPE_FLTRES	= 0x6
    67  	_FPE_FLTINV	= 0x7
    68  	_FPE_FLTSUB	= 0x8
    69  
    70  	_BUS_ADRALN	= 0x1
    71  	_BUS_ADRERR	= 0x2
    72  	_BUS_OBJERR	= 0x3
    73  
    74  	_SEGV_MAPERR	= 0x1
    75  	_SEGV_ACCERR	= 0x2
    76  
    77  	_ITIMER_REAL	= 0x0
    78  	_ITIMER_VIRTUAL	= 0x1
    79  	_ITIMER_PROF	= 0x2
    80  
    81  	_EPOLLIN	= 0x1
    82  	_EPOLLOUT	= 0x4
    83  	_EPOLLERR	= 0x8
    84  	_EPOLLHUP	= 0x10
    85  	_EPOLLRDHUP	= 0x2000
    86  	_EPOLLET	= 0x80000000
    87  	_EPOLL_CLOEXEC	= 0x80000
    88  	_EPOLL_CTL_ADD	= 0x1
    89  	_EPOLL_CTL_DEL	= 0x2
    90  	_EPOLL_CTL_MOD	= 0x3
    91  )
    92  
    93  //struct Sigset {
    94  //	uint64	sig[1];
    95  //};
    96  //typedef uint64 Sigset;
    97  
    98  type timespec struct {
    99  	tv_sec	int64
   100  	tv_nsec	int64
   101  }
   102  
   103  //go:nosplit
   104  func (ts *timespec) setNsec(ns int64) {
   105  	ts.tv_sec = ns / 1e9
   106  	ts.tv_nsec = ns % 1e9
   107  }
   108  
   109  type timeval struct {
   110  	tv_sec	int64
   111  	tv_usec	int64
   112  }
   113  
   114  func (tv *timeval) set_usec(x int32) {
   115  	tv.tv_usec = int64(x)
   116  }
   117  
   118  type sigactiont struct {
   119  	sa_flags	uint32
   120  	sa_handler	uintptr
   121  	sa_mask		[2]uint64
   122  	// linux header does not have sa_restorer field,
   123  	// but it is used in setsig(). it is no harm to put it here
   124  	sa_restorer	uintptr
   125  }
   126  
   127  type siginfo struct {
   128  	si_signo	int32
   129  	si_code		int32
   130  	si_errno	int32
   131  	__pad0		[1]int32
   132  	// below here is a union; si_addr is the only field we use
   133  	si_addr	uint64
   134  }
   135  
   136  type itimerval struct {
   137  	it_interval	timeval
   138  	it_value	timeval
   139  }
   140  
   141  type epollevent struct {
   142  	events		uint32
   143  	pad_cgo_0	[4]byte
   144  	data		[8]byte	// unaligned uintptr
   145  }
   146  
   147  const (
   148  	_O_RDONLY	= 0x0
   149  	_O_NONBLOCK	= 0x80
   150  	_O_CLOEXEC	= 0x80000
   151  	_SA_RESTORER	= 0
   152  )
   153  
   154  type stackt struct {
   155  	ss_sp		*byte
   156  	ss_size		uintptr
   157  	ss_flags	int32
   158  }
   159  
   160  type sigcontext struct {
   161  	sc_regs		[32]uint64
   162  	sc_fpregs	[32]uint64
   163  	sc_mdhi		uint64
   164  	sc_hi1		uint64
   165  	sc_hi2		uint64
   166  	sc_hi3		uint64
   167  	sc_mdlo		uint64
   168  	sc_lo1		uint64
   169  	sc_lo2		uint64
   170  	sc_lo3		uint64
   171  	sc_pc		uint64
   172  	sc_fpc_csr	uint32
   173  	sc_used_math	uint32
   174  	sc_dsp		uint32
   175  	sc_reserved	uint32
   176  }
   177  
   178  type ucontext struct {
   179  	uc_flags	uint64
   180  	uc_link		*ucontext
   181  	uc_stack	stackt
   182  	uc_mcontext	sigcontext
   183  	uc_sigmask	uint64
   184  }