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_ENABLE    = 0x4
    92  	_EV_DISABLE   = 0x8
    93  	_EV_CLEAR     = 0x20
    94  	_EV_ERROR     = 0x4000
    95  	_EV_EOF       = 0x8000
    96  	_EVFILT_READ  = -0x1
    97  	_EVFILT_WRITE = -0x2
    98  	_EVFILT_USER  = -0x9
    99  
   100  	_NOTE_TRIGGER = 0x1000000
   101  )
   102  
   103  type rtprio struct {
   104  	_type uint16
   105  	prio  uint16
   106  }
   107  
   108  type lwpparams struct {
   109  	start_func uintptr
   110  	arg        unsafe.Pointer
   111  	stack      uintptr
   112  	tid1       unsafe.Pointer // *int32
   113  	tid2       unsafe.Pointer // *int32
   114  }
   115  
   116  type sigset struct {
   117  	__bits [4]uint32
   118  }
   119  
   120  type stackt struct {
   121  	ss_sp     uintptr
   122  	ss_size   uintptr
   123  	ss_flags  int32
   124  	pad_cgo_0 [4]byte
   125  }
   126  
   127  type siginfo struct {
   128  	si_signo  int32
   129  	si_errno  int32
   130  	si_code   int32
   131  	si_pid    int32
   132  	si_uid    uint32
   133  	si_status int32
   134  	si_addr   uint64
   135  	si_value  [8]byte
   136  	si_band   int64
   137  	__spare__ [7]int32
   138  	pad_cgo_0 [4]byte
   139  }
   140  
   141  type mcontext struct {
   142  	mc_onstack  uint64
   143  	mc_rdi      uint64
   144  	mc_rsi      uint64
   145  	mc_rdx      uint64
   146  	mc_rcx      uint64
   147  	mc_r8       uint64
   148  	mc_r9       uint64
   149  	mc_rax      uint64
   150  	mc_rbx      uint64
   151  	mc_rbp      uint64
   152  	mc_r10      uint64
   153  	mc_r11      uint64
   154  	mc_r12      uint64
   155  	mc_r13      uint64
   156  	mc_r14      uint64
   157  	mc_r15      uint64
   158  	mc_xflags   uint64
   159  	mc_trapno   uint64
   160  	mc_addr     uint64
   161  	mc_flags    uint64
   162  	mc_err      uint64
   163  	mc_rip      uint64
   164  	mc_cs       uint64
   165  	mc_rflags   uint64
   166  	mc_rsp      uint64
   167  	mc_ss       uint64
   168  	mc_len      uint32
   169  	mc_fpformat uint32
   170  	mc_ownedfp  uint32
   171  	mc_reserved uint32
   172  	mc_unused   [8]uint32
   173  	mc_fpregs   [256]int32
   174  }
   175  
   176  type ucontext struct {
   177  	uc_sigmask  sigset
   178  	pad_cgo_0   [48]byte
   179  	uc_mcontext mcontext
   180  	uc_link     *ucontext
   181  	uc_stack    stackt
   182  	__spare__   [8]int32
   183  }
   184  
   185  type timespec struct {
   186  	tv_sec  int64
   187  	tv_nsec int64
   188  }
   189  
   190  //go:nosplit
   191  func (ts *timespec) setNsec(ns int64) {
   192  	ts.tv_sec = ns / 1e9
   193  	ts.tv_nsec = ns % 1e9
   194  }
   195  
   196  type timeval struct {
   197  	tv_sec  int64
   198  	tv_usec int64
   199  }
   200  
   201  func (tv *timeval) set_usec(x int32) {
   202  	tv.tv_usec = int64(x)
   203  }
   204  
   205  type itimerval struct {
   206  	it_interval timeval
   207  	it_value    timeval
   208  }
   209  
   210  type keventt struct {
   211  	ident  uint64
   212  	filter int16
   213  	flags  uint16
   214  	fflags uint32
   215  	data   int64
   216  	udata  *byte
   217  }
   218  

View as plain text