github.com/mtsmfm/go/src@v0.0.0-20221020090648-44bdcb9f8fde/runtime/defs_freebsd_amd64.go (about)

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