Source file src/runtime/defs1_netbsd_amd64.go

     1  // created by cgo -cdefs and then converted to Go
     2  // cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go
     3  
     4  package runtime
     5  
     6  const (
     7  	_EINTR  = 0x4
     8  	_EFAULT = 0xe
     9  	_EAGAIN = 0x23
    10  	_ENOSYS = 0x4e
    11  
    12  	_O_NONBLOCK = 0x4
    13  	_O_CLOEXEC  = 0x400000
    14  
    15  	_PROT_NONE  = 0x0
    16  	_PROT_READ  = 0x1
    17  	_PROT_WRITE = 0x2
    18  	_PROT_EXEC  = 0x4
    19  
    20  	_MAP_ANON    = 0x1000
    21  	_MAP_PRIVATE = 0x2
    22  	_MAP_FIXED   = 0x10
    23  
    24  	_MADV_FREE = 0x6
    25  
    26  	_SA_SIGINFO = 0x40
    27  	_SA_RESTART = 0x2
    28  	_SA_ONSTACK = 0x1
    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  	_SIGTERM   = 0xf
    45  	_SIGURG    = 0x10
    46  	_SIGSTOP   = 0x11
    47  	_SIGTSTP   = 0x12
    48  	_SIGCONT   = 0x13
    49  	_SIGCHLD   = 0x14
    50  	_SIGTTIN   = 0x15
    51  	_SIGTTOU   = 0x16
    52  	_SIGIO     = 0x17
    53  	_SIGXCPU   = 0x18
    54  	_SIGXFSZ   = 0x19
    55  	_SIGVTALRM = 0x1a
    56  	_SIGPROF   = 0x1b
    57  	_SIGWINCH  = 0x1c
    58  	_SIGINFO   = 0x1d
    59  	_SIGUSR1   = 0x1e
    60  	_SIGUSR2   = 0x1f
    61  
    62  	_FPE_INTDIV = 0x1
    63  	_FPE_INTOVF = 0x2
    64  	_FPE_FLTDIV = 0x3
    65  	_FPE_FLTOVF = 0x4
    66  	_FPE_FLTUND = 0x5
    67  	_FPE_FLTRES = 0x6
    68  	_FPE_FLTINV = 0x7
    69  	_FPE_FLTSUB = 0x8
    70  
    71  	_BUS_ADRALN = 0x1
    72  	_BUS_ADRERR = 0x2
    73  	_BUS_OBJERR = 0x3
    74  
    75  	_SEGV_MAPERR = 0x1
    76  	_SEGV_ACCERR = 0x2
    77  
    78  	_ITIMER_REAL    = 0x0
    79  	_ITIMER_VIRTUAL = 0x1
    80  	_ITIMER_PROF    = 0x2
    81  
    82  	_EV_ADD       = 0x1
    83  	_EV_DELETE    = 0x2
    84  	_EV_CLEAR     = 0x20
    85  	_EV_RECEIPT   = 0
    86  	_EV_ERROR     = 0x4000
    87  	_EV_EOF       = 0x8000
    88  	_EVFILT_READ  = 0x0
    89  	_EVFILT_WRITE = 0x1
    90  )
    91  
    92  type sigset struct {
    93  	__bits [4]uint32
    94  }
    95  
    96  type siginfo struct {
    97  	_signo  int32
    98  	_code   int32
    99  	_errno  int32
   100  	_pad    int32
   101  	_reason [24]byte
   102  }
   103  
   104  type stackt struct {
   105  	ss_sp     uintptr
   106  	ss_size   uintptr
   107  	ss_flags  int32
   108  	pad_cgo_0 [4]byte
   109  }
   110  
   111  type timespec struct {
   112  	tv_sec  int64
   113  	tv_nsec int64
   114  }
   115  
   116  //go:nosplit
   117  func (ts *timespec) setNsec(ns int64) {
   118  	ts.tv_sec = ns / 1e9
   119  	ts.tv_nsec = ns % 1e9
   120  }
   121  
   122  type timeval struct {
   123  	tv_sec    int64
   124  	tv_usec   int32
   125  	pad_cgo_0 [4]byte
   126  }
   127  
   128  func (tv *timeval) set_usec(x int32) {
   129  	tv.tv_usec = x
   130  }
   131  
   132  type itimerval struct {
   133  	it_interval timeval
   134  	it_value    timeval
   135  }
   136  
   137  type mcontextt struct {
   138  	__gregs     [26]uint64
   139  	_mc_tlsbase uint64
   140  	__fpregs    [512]int8
   141  }
   142  
   143  type ucontextt struct {
   144  	uc_flags    uint32
   145  	pad_cgo_0   [4]byte
   146  	uc_link     *ucontextt
   147  	uc_sigmask  sigset
   148  	uc_stack    stackt
   149  	uc_mcontext mcontextt
   150  }
   151  
   152  type keventt struct {
   153  	ident     uint64
   154  	filter    uint32
   155  	flags     uint32
   156  	fflags    uint32
   157  	pad_cgo_0 [4]byte
   158  	data      int64
   159  	udata     *byte
   160  }
   161  
   162  // created by cgo -cdefs and then converted to Go
   163  // cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go
   164  
   165  const (
   166  	_REG_RDI    = 0x0
   167  	_REG_RSI    = 0x1
   168  	_REG_RDX    = 0x2
   169  	_REG_RCX    = 0x3
   170  	_REG_R8     = 0x4
   171  	_REG_R9     = 0x5
   172  	_REG_R10    = 0x6
   173  	_REG_R11    = 0x7
   174  	_REG_R12    = 0x8
   175  	_REG_R13    = 0x9
   176  	_REG_R14    = 0xa
   177  	_REG_R15    = 0xb
   178  	_REG_RBP    = 0xc
   179  	_REG_RBX    = 0xd
   180  	_REG_RAX    = 0xe
   181  	_REG_GS     = 0xf
   182  	_REG_FS     = 0x10
   183  	_REG_ES     = 0x11
   184  	_REG_DS     = 0x12
   185  	_REG_TRAPNO = 0x13
   186  	_REG_ERR    = 0x14
   187  	_REG_RIP    = 0x15
   188  	_REG_CS     = 0x16
   189  	_REG_RFLAGS = 0x17
   190  	_REG_RSP    = 0x18
   191  	_REG_SS     = 0x19
   192  )
   193  

View as plain text