...

Source file src/runtime/defs_linux_mips64x.go

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

View as plain text