Source file src/runtime/defs1_netbsd_386.go

     1  // created by cgo -cdefs and then converted to Go
     2  // cgo -cdefs defs_netbsd.go defs_netbsd_386.go
     3  
     4  package runtime
     5  
     6  const (
     7  	_EINTR  = 0x4
     8  	_EFAULT = 0xe
     9  	_EAGAIN = 0x23
    10  
    11  	_O_NONBLOCK = 0x4
    12  	_O_CLOEXEC  = 0x400000
    13  
    14  	_PROT_NONE  = 0x0
    15  	_PROT_READ  = 0x1
    16  	_PROT_WRITE = 0x2
    17  	_PROT_EXEC  = 0x4
    18  
    19  	_MAP_ANON    = 0x1000
    20  	_MAP_PRIVATE = 0x2
    21  	_MAP_FIXED   = 0x10
    22  
    23  	_MADV_FREE = 0x6
    24  
    25  	_SA_SIGINFO = 0x40
    26  	_SA_RESTART = 0x2
    27  	_SA_ONSTACK = 0x1
    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  	_SIGTERM   = 0xf
    44  	_SIGURG    = 0x10
    45  	_SIGSTOP   = 0x11
    46  	_SIGTSTP   = 0x12
    47  	_SIGCONT   = 0x13
    48  	_SIGCHLD   = 0x14
    49  	_SIGTTIN   = 0x15
    50  	_SIGTTOU   = 0x16
    51  	_SIGIO     = 0x17
    52  	_SIGXCPU   = 0x18
    53  	_SIGXFSZ   = 0x19
    54  	_SIGVTALRM = 0x1a
    55  	_SIGPROF   = 0x1b
    56  	_SIGWINCH  = 0x1c
    57  	_SIGINFO   = 0x1d
    58  	_SIGUSR1   = 0x1e
    59  	_SIGUSR2   = 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  	_EV_ADD       = 0x1
    82  	_EV_DELETE    = 0x2
    83  	_EV_CLEAR     = 0x20
    84  	_EV_RECEIPT   = 0
    85  	_EV_ERROR     = 0x4000
    86  	_EV_EOF       = 0x8000
    87  	_EVFILT_READ  = 0x0
    88  	_EVFILT_WRITE = 0x1
    89  )
    90  
    91  type sigset struct {
    92  	__bits [4]uint32
    93  }
    94  
    95  type siginfo struct {
    96  	_signo  int32
    97  	_code   int32
    98  	_errno  int32
    99  	_reason [20]byte
   100  }
   101  
   102  type stackt struct {
   103  	ss_sp    uintptr
   104  	ss_size  uintptr
   105  	ss_flags int32
   106  }
   107  
   108  type timespec struct {
   109  	tv_sec  int64
   110  	tv_nsec int32
   111  }
   112  
   113  //go:nosplit
   114  func (ts *timespec) setNsec(ns int64) {
   115  	ts.tv_sec = int64(timediv(ns, 1e9, &ts.tv_nsec))
   116  }
   117  
   118  type timeval struct {
   119  	tv_sec  int64
   120  	tv_usec int32
   121  }
   122  
   123  func (tv *timeval) set_usec(x int32) {
   124  	tv.tv_usec = x
   125  }
   126  
   127  type itimerval struct {
   128  	it_interval timeval
   129  	it_value    timeval
   130  }
   131  
   132  type mcontextt struct {
   133  	__gregs     [19]uint32
   134  	__fpregs    [644]byte
   135  	_mc_tlsbase int32
   136  }
   137  
   138  type ucontextt struct {
   139  	uc_flags    uint32
   140  	uc_link     *ucontextt
   141  	uc_sigmask  sigset
   142  	uc_stack    stackt
   143  	uc_mcontext mcontextt
   144  	__uc_pad    [4]int32
   145  }
   146  
   147  type keventt struct {
   148  	ident  uint32
   149  	filter uint32
   150  	flags  uint32
   151  	fflags uint32
   152  	data   int64
   153  	udata  *byte
   154  }
   155  
   156  // created by cgo -cdefs and then converted to Go
   157  // cgo -cdefs defs_netbsd.go defs_netbsd_386.go
   158  
   159  const (
   160  	_REG_GS     = 0x0
   161  	_REG_FS     = 0x1
   162  	_REG_ES     = 0x2
   163  	_REG_DS     = 0x3
   164  	_REG_EDI    = 0x4
   165  	_REG_ESI    = 0x5
   166  	_REG_EBP    = 0x6
   167  	_REG_ESP    = 0x7
   168  	_REG_EBX    = 0x8
   169  	_REG_EDX    = 0x9
   170  	_REG_ECX    = 0xa
   171  	_REG_EAX    = 0xb
   172  	_REG_TRAPNO = 0xc
   173  	_REG_ERR    = 0xd
   174  	_REG_EIP    = 0xe
   175  	_REG_CS     = 0xf
   176  	_REG_EFL    = 0x10
   177  	_REG_UESP   = 0x11
   178  	_REG_SS     = 0x12
   179  )
   180  

View as plain text