Source file src/runtime/defs_freebsd_amd64.go

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

View as plain text