github.com/twelsh-aw/go/src@v0.0.0-20230516233729-a56fe86a7c81/runtime/defs_dragonfly_amd64.go (about)

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