Home | History | Annotate | Download | only in runtime
      1 // created by cgo -cdefs and then converted to Go
      2 // cgo -cdefs defs_dragonfly.go
      3 
      4 package runtime
      5 
      6 import "unsafe"
      7 
      8 const (
      9 	_EINTR  = 0x4
     10 	_EFAULT = 0xe
     11 	_EBUSY  = 0x10
     12 	_EAGAIN = 0x23
     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 = 0x5
     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 = 0x2
     62 	_FPE_INTOVF = 0x1
     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_ERROR     = 0x4000
     85 	_EVFILT_READ  = -0x1
     86 	_EVFILT_WRITE = -0x2
     87 )
     88 
     89 type rtprio struct {
     90 	_type uint16
     91 	prio  uint16
     92 }
     93 
     94 type lwpparams struct {
     95 	start_func uintptr
     96 	arg        unsafe.Pointer
     97 	stack      uintptr
     98 	tid1       unsafe.Pointer // *int32
     99 	tid2       unsafe.Pointer // *int32
    100 }
    101 
    102 type sigaltstackt struct {
    103 	ss_sp     uintptr
    104 	ss_size   uintptr
    105 	ss_flags  int32
    106 	pad_cgo_0 [4]byte
    107 }
    108 
    109 type sigset struct {
    110 	__bits [4]uint32
    111 }
    112 
    113 type stackt struct {
    114 	ss_sp     uintptr
    115 	ss_size   uintptr
    116 	ss_flags  int32
    117 	pad_cgo_0 [4]byte
    118 }
    119 
    120 type siginfo struct {
    121 	si_signo  int32
    122 	si_errno  int32
    123 	si_code   int32
    124 	si_pid    int32
    125 	si_uid    uint32
    126 	si_status int32
    127 	si_addr   uint64
    128 	si_value  [8]byte
    129 	si_band   int64
    130 	__spare__ [7]int32
    131 	pad_cgo_0 [4]byte
    132 }
    133 
    134 type mcontext struct {
    135 	mc_onstack  uint64
    136 	mc_rdi      uint64
    137 	mc_rsi      uint64
    138 	mc_rdx      uint64
    139 	mc_rcx      uint64
    140 	mc_r8       uint64
    141 	mc_r9       uint64
    142 	mc_rax      uint64
    143 	mc_rbx      uint64
    144 	mc_rbp      uint64
    145 	mc_r10      uint64
    146 	mc_r11      uint64
    147 	mc_r12      uint64
    148 	mc_r13      uint64
    149 	mc_r14      uint64
    150 	mc_r15      uint64
    151 	mc_xflags   uint64
    152 	mc_trapno   uint64
    153 	mc_addr     uint64
    154 	mc_flags    uint64
    155 	mc_err      uint64
    156 	mc_rip      uint64
    157 	mc_cs       uint64
    158 	mc_rflags   uint64
    159 	mc_rsp      uint64
    160 	mc_ss       uint64
    161 	mc_len      uint32
    162 	mc_fpformat uint32
    163 	mc_ownedfp  uint32
    164 	mc_reserved uint32
    165 	mc_unused   [8]uint32
    166 	mc_fpregs   [256]int32
    167 }
    168 
    169 type ucontext struct {
    170 	uc_sigmask  sigset
    171 	pad_cgo_0   [48]byte
    172 	uc_mcontext mcontext
    173 	uc_link     *ucontext
    174 	uc_stack    stackt
    175 	__spare__   [8]int32
    176 }
    177 
    178 type timespec struct {
    179 	tv_sec  int64
    180 	tv_nsec int64
    181 }
    182 
    183 func (ts *timespec) set_sec(x int64) {
    184 	ts.tv_sec = x
    185 }
    186 
    187 type timeval struct {
    188 	tv_sec  int64
    189 	tv_usec int64
    190 }
    191 
    192 func (tv *timeval) set_usec(x int32) {
    193 	tv.tv_usec = int64(x)
    194 }
    195 
    196 type itimerval struct {
    197 	it_interval timeval
    198 	it_value    timeval
    199 }
    200 
    201 type keventt struct {
    202 	ident  uint64
    203 	filter int16
    204 	flags  uint16
    205 	fflags uint32
    206 	data   int64
    207 	udata  *byte
    208 }
    209