Black Lives Matter. Support the Equal Justice Initiative.

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

View as plain text