Source file src/runtime/defs_dragonfly_amd64.go

     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  	_ETIMEDOUT = 0x3c
    14  
    15  	_O_WRONLY   = 0x1
    16  	_O_NONBLOCK = 0x4
    17  	_O_CREAT    = 0x200
    18  	_O_TRUNC    = 0x400
    19  	_O_CLOEXEC  = 0x20000
    20  
    21  	_PROT_NONE  = 0x0
    22  	_PROT_READ  = 0x1
    23  	_PROT_WRITE = 0x2
    24  	_PROT_EXEC  = 0x4
    25  
    26  	_MAP_ANON    = 0x1000
    27  	_MAP_PRIVATE = 0x2
    28  	_MAP_FIXED   = 0x10
    29  
    30  	_MADV_DONTNEED = 0x4
    31  	_MADV_FREE     = 0x5
    32  
    33  	_SA_SIGINFO = 0x40
    34  	_SA_RESTART = 0x2
    35  	_SA_ONSTACK = 0x1
    36  
    37  	_SIGHUP    = 0x1
    38  	_SIGINT    = 0x2
    39  	_SIGQUIT   = 0x3
    40  	_SIGILL    = 0x4
    41  	_SIGTRAP   = 0x5
    42  	_SIGABRT   = 0x6
    43  	_SIGEMT    = 0x7
    44  	_SIGFPE    = 0x8
    45  	_SIGKILL   = 0x9
    46  	_SIGBUS    = 0xa
    47  	_SIGSEGV   = 0xb
    48  	_SIGSYS    = 0xc
    49  	_SIGPIPE   = 0xd
    50  	_SIGALRM   = 0xe
    51  	_SIGTERM   = 0xf
    52  	_SIGURG    = 0x10
    53  	_SIGSTOP   = 0x11
    54  	_SIGTSTP   = 0x12
    55  	_SIGCONT   = 0x13
    56  	_SIGCHLD   = 0x14
    57  	_SIGTTIN   = 0x15
    58  	_SIGTTOU   = 0x16
    59  	_SIGIO     = 0x17
    60  	_SIGXCPU   = 0x18
    61  	_SIGXFSZ   = 0x19
    62  	_SIGVTALRM = 0x1a
    63  	_SIGPROF   = 0x1b
    64  	_SIGWINCH  = 0x1c
    65  	_SIGINFO   = 0x1d
    66  	_SIGUSR1   = 0x1e
    67  	_SIGUSR2   = 0x1f
    68  
    69  	_FPE_INTDIV = 0x2
    70  	_FPE_INTOVF = 0x1
    71  	_FPE_FLTDIV = 0x3
    72  	_FPE_FLTOVF = 0x4
    73  	_FPE_FLTUND = 0x5
    74  	_FPE_FLTRES = 0x6
    75  	_FPE_FLTINV = 0x7
    76  	_FPE_FLTSUB = 0x8
    77  
    78  	_BUS_ADRALN = 0x1
    79  	_BUS_ADRERR = 0x2
    80  	_BUS_OBJERR = 0x3
    81  
    82  	_SEGV_MAPERR = 0x1
    83  	_SEGV_ACCERR = 0x2
    84  
    85  	_ITIMER_REAL    = 0x0
    86  	_ITIMER_VIRTUAL = 0x1
    87  	_ITIMER_PROF    = 0x2
    88  
    89  	_EV_ADD       = 0x1
    90  	_EV_DELETE    = 0x2
    91  	_EV_CLEAR     = 0x20
    92  	_EV_ERROR     = 0x4000
    93  	_EV_EOF       = 0x8000
    94  	_EVFILT_READ  = -0x1
    95  	_EVFILT_WRITE = -0x2
    96  )
    97  
    98  type rtprio struct {
    99  	_type uint16
   100  	prio  uint16
   101  }
   102  
   103  type lwpparams struct {
   104  	start_func uintptr
   105  	arg        unsafe.Pointer
   106  	stack      uintptr
   107  	tid1       unsafe.Pointer // *int32
   108  	tid2       unsafe.Pointer // *int32
   109  }
   110  
   111  type sigset struct {
   112  	__bits [4]uint32
   113  }
   114  
   115  type stackt struct {
   116  	ss_sp     uintptr
   117  	ss_size   uintptr
   118  	ss_flags  int32
   119  	pad_cgo_0 [4]byte
   120  }
   121  
   122  type siginfo struct {
   123  	si_signo  int32
   124  	si_errno  int32
   125  	si_code   int32
   126  	si_pid    int32
   127  	si_uid    uint32
   128  	si_status int32
   129  	si_addr   uint64
   130  	si_value  [8]byte
   131  	si_band   int64
   132  	__spare__ [7]int32
   133  	pad_cgo_0 [4]byte
   134  }
   135  
   136  type mcontext struct {
   137  	mc_onstack  uint64
   138  	mc_rdi      uint64
   139  	mc_rsi      uint64
   140  	mc_rdx      uint64
   141  	mc_rcx      uint64
   142  	mc_r8       uint64
   143  	mc_r9       uint64
   144  	mc_rax      uint64
   145  	mc_rbx      uint64
   146  	mc_rbp      uint64
   147  	mc_r10      uint64
   148  	mc_r11      uint64
   149  	mc_r12      uint64
   150  	mc_r13      uint64
   151  	mc_r14      uint64
   152  	mc_r15      uint64
   153  	mc_xflags   uint64
   154  	mc_trapno   uint64
   155  	mc_addr     uint64
   156  	mc_flags    uint64
   157  	mc_err      uint64
   158  	mc_rip      uint64
   159  	mc_cs       uint64
   160  	mc_rflags   uint64
   161  	mc_rsp      uint64
   162  	mc_ss       uint64
   163  	mc_len      uint32
   164  	mc_fpformat uint32
   165  	mc_ownedfp  uint32
   166  	mc_reserved uint32
   167  	mc_unused   [8]uint32
   168  	mc_fpregs   [256]int32
   169  }
   170  
   171  type ucontext struct {
   172  	uc_sigmask  sigset
   173  	pad_cgo_0   [48]byte
   174  	uc_mcontext mcontext
   175  	uc_link     *ucontext
   176  	uc_stack    stackt
   177  	__spare__   [8]int32
   178  }
   179  
   180  type timespec struct {
   181  	tv_sec  int64
   182  	tv_nsec int64
   183  }
   184  
   185  //go:nosplit
   186  func (ts *timespec) setNsec(ns int64) {
   187  	ts.tv_sec = ns / 1e9
   188  	ts.tv_nsec = ns % 1e9
   189  }
   190  
   191  type timeval struct {
   192  	tv_sec  int64
   193  	tv_usec int64
   194  }
   195  
   196  func (tv *timeval) set_usec(x int32) {
   197  	tv.tv_usec = int64(x)
   198  }
   199  
   200  type itimerval struct {
   201  	it_interval timeval
   202  	it_value    timeval
   203  }
   204  
   205  type keventt struct {
   206  	ident  uint64
   207  	filter int16
   208  	flags  uint16
   209  	fflags uint32
   210  	data   int64
   211  	udata  *byte
   212  }
   213  

View as plain text