...
Run Format

Source file src/runtime/defs_freebsd_amd64.go

Documentation: runtime

     1  // created by cgo -cdefs and then converted to Go
     2  // cgo -cdefs defs_freebsd.go
     3  
     4  package runtime
     5  
     6  import "unsafe"
     7  
     8  const (
     9  	_NBBY            = 0x8
    10  	_CTL_MAXNAME     = 0x18
    11  	_CPU_LEVEL_WHICH = 0x3
    12  	_CPU_WHICH_PID   = 0x2
    13  )
    14  
    15  const (
    16  	_EINTR  = 0x4
    17  	_EFAULT = 0xe
    18  
    19  	_PROT_NONE  = 0x0
    20  	_PROT_READ  = 0x1
    21  	_PROT_WRITE = 0x2
    22  	_PROT_EXEC  = 0x4
    23  
    24  	_MAP_ANON    = 0x1000
    25  	_MAP_PRIVATE = 0x2
    26  	_MAP_FIXED   = 0x10
    27  
    28  	_MADV_FREE = 0x5
    29  
    30  	_SA_SIGINFO = 0x40
    31  	_SA_RESTART = 0x2
    32  	_SA_ONSTACK = 0x1
    33  
    34  	_CLOCK_MONOTONIC = 0x4
    35  
    36  	_UMTX_OP_WAIT_UINT         = 0xb
    37  	_UMTX_OP_WAIT_UINT_PRIVATE = 0xf
    38  	_UMTX_OP_WAKE              = 0x3
    39  	_UMTX_OP_WAKE_PRIVATE      = 0x10
    40  
    41  	_SIGHUP    = 0x1
    42  	_SIGINT    = 0x2
    43  	_SIGQUIT   = 0x3
    44  	_SIGILL    = 0x4
    45  	_SIGTRAP   = 0x5
    46  	_SIGABRT   = 0x6
    47  	_SIGEMT    = 0x7
    48  	_SIGFPE    = 0x8
    49  	_SIGKILL   = 0x9
    50  	_SIGBUS    = 0xa
    51  	_SIGSEGV   = 0xb
    52  	_SIGSYS    = 0xc
    53  	_SIGPIPE   = 0xd
    54  	_SIGALRM   = 0xe
    55  	_SIGTERM   = 0xf
    56  	_SIGURG    = 0x10
    57  	_SIGSTOP   = 0x11
    58  	_SIGTSTP   = 0x12
    59  	_SIGCONT   = 0x13
    60  	_SIGCHLD   = 0x14
    61  	_SIGTTIN   = 0x15
    62  	_SIGTTOU   = 0x16
    63  	_SIGIO     = 0x17
    64  	_SIGXCPU   = 0x18
    65  	_SIGXFSZ   = 0x19
    66  	_SIGVTALRM = 0x1a
    67  	_SIGPROF   = 0x1b
    68  	_SIGWINCH  = 0x1c
    69  	_SIGINFO   = 0x1d
    70  	_SIGUSR1   = 0x1e
    71  	_SIGUSR2   = 0x1f
    72  
    73  	_FPE_INTDIV = 0x2
    74  	_FPE_INTOVF = 0x1
    75  	_FPE_FLTDIV = 0x3
    76  	_FPE_FLTOVF = 0x4
    77  	_FPE_FLTUND = 0x5
    78  	_FPE_FLTRES = 0x6
    79  	_FPE_FLTINV = 0x7
    80  	_FPE_FLTSUB = 0x8
    81  
    82  	_BUS_ADRALN = 0x1
    83  	_BUS_ADRERR = 0x2
    84  	_BUS_OBJERR = 0x3
    85  
    86  	_SEGV_MAPERR = 0x1
    87  	_SEGV_ACCERR = 0x2
    88  
    89  	_ITIMER_REAL    = 0x0
    90  	_ITIMER_VIRTUAL = 0x1
    91  	_ITIMER_PROF    = 0x2
    92  
    93  	_EV_ADD       = 0x1
    94  	_EV_DELETE    = 0x2
    95  	_EV_CLEAR     = 0x20
    96  	_EV_RECEIPT   = 0x40
    97  	_EV_ERROR     = 0x4000
    98  	_EV_EOF       = 0x8000
    99  	_EVFILT_READ  = -0x1
   100  	_EVFILT_WRITE = -0x2
   101  )
   102  
   103  type rtprio struct {
   104  	_type uint16
   105  	prio  uint16
   106  }
   107  
   108  type thrparam struct {
   109  	start_func uintptr
   110  	arg        unsafe.Pointer
   111  	stack_base uintptr
   112  	stack_size uintptr
   113  	tls_base   unsafe.Pointer
   114  	tls_size   uintptr
   115  	child_tid  unsafe.Pointer // *int64
   116  	parent_tid *int64
   117  	flags      int32
   118  	pad_cgo_0  [4]byte
   119  	rtp        *rtprio
   120  	spare      [3]uintptr
   121  }
   122  
   123  type sigset struct {
   124  	__bits [4]uint32
   125  }
   126  
   127  type stackt struct {
   128  	ss_sp     uintptr
   129  	ss_size   uintptr
   130  	ss_flags  int32
   131  	pad_cgo_0 [4]byte
   132  }
   133  
   134  type siginfo struct {
   135  	si_signo  int32
   136  	si_errno  int32
   137  	si_code   int32
   138  	si_pid    int32
   139  	si_uid    uint32
   140  	si_status int32
   141  	si_addr   uint64
   142  	si_value  [8]byte
   143  	_reason   [40]byte
   144  }
   145  
   146  type mcontext struct {
   147  	mc_onstack       uint64
   148  	mc_rdi           uint64
   149  	mc_rsi           uint64
   150  	mc_rdx           uint64
   151  	mc_rcx           uint64
   152  	mc_r8            uint64
   153  	mc_r9            uint64
   154  	mc_rax           uint64
   155  	mc_rbx           uint64
   156  	mc_rbp           uint64
   157  	mc_r10           uint64
   158  	mc_r11           uint64
   159  	mc_r12           uint64
   160  	mc_r13           uint64
   161  	mc_r14           uint64
   162  	mc_r15           uint64
   163  	mc_trapno        uint32
   164  	mc_fs            uint16
   165  	mc_gs            uint16
   166  	mc_addr          uint64
   167  	mc_flags         uint32
   168  	mc_es            uint16
   169  	mc_ds            uint16
   170  	mc_err           uint64
   171  	mc_rip           uint64
   172  	mc_cs            uint64
   173  	mc_rflags        uint64
   174  	mc_rsp           uint64
   175  	mc_ss            uint64
   176  	mc_len           uint64
   177  	mc_fpformat      uint64
   178  	mc_ownedfp       uint64
   179  	mc_fpstate       [64]uint64
   180  	mc_fsbase        uint64
   181  	mc_gsbase        uint64
   182  	mc_xfpustate     uint64
   183  	mc_xfpustate_len uint64
   184  	mc_spare         [4]uint64
   185  }
   186  
   187  type ucontext struct {
   188  	uc_sigmask  sigset
   189  	uc_mcontext mcontext
   190  	uc_link     *ucontext
   191  	uc_stack    stackt
   192  	uc_flags    int32
   193  	__spare__   [4]int32
   194  	pad_cgo_0   [12]byte
   195  }
   196  
   197  type timespec struct {
   198  	tv_sec  int64
   199  	tv_nsec int64
   200  }
   201  
   202  func (ts *timespec) set_sec(x int64) {
   203  	ts.tv_sec = x
   204  }
   205  
   206  type timeval struct {
   207  	tv_sec  int64
   208  	tv_usec int64
   209  }
   210  
   211  func (tv *timeval) set_usec(x int32) {
   212  	tv.tv_usec = int64(x)
   213  }
   214  
   215  type itimerval struct {
   216  	it_interval timeval
   217  	it_value    timeval
   218  }
   219  
   220  type umtx_time struct {
   221  	_timeout timespec
   222  	_flags   uint32
   223  	_clockid uint32
   224  }
   225  
   226  type keventt struct {
   227  	ident  uint64
   228  	filter int16
   229  	flags  uint16
   230  	fflags uint32
   231  	data   int64
   232  	udata  *byte
   233  }
   234  

View as plain text