...
Run Format

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

View as plain text