github.com/lzhfromustc/gofuzz@v0.0.0-20211116160056-151b3108bbd1/runtime/defs_linux_mips64x.go (about)

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