...

Source file src/runtime/defs_freebsd_amd64.go

     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 // *int64
   118		parent_tid *int64
   119		flags      int32
   120		pad_cgo_0  [4]byte
   121		rtp        *rtprio
   122		spare      [3]uintptr
   123	}
   124	
   125	type sigset struct {
   126		__bits [4]uint32
   127	}
   128	
   129	type stackt struct {
   130		ss_sp     uintptr
   131		ss_size   uintptr
   132		ss_flags  int32
   133		pad_cgo_0 [4]byte
   134	}
   135	
   136	type siginfo struct {
   137		si_signo  int32
   138		si_errno  int32
   139		si_code   int32
   140		si_pid    int32
   141		si_uid    uint32
   142		si_status int32
   143		si_addr   uint64
   144		si_value  [8]byte
   145		_reason   [40]byte
   146	}
   147	
   148	type mcontext struct {
   149		mc_onstack       uint64
   150		mc_rdi           uint64
   151		mc_rsi           uint64
   152		mc_rdx           uint64
   153		mc_rcx           uint64
   154		mc_r8            uint64
   155		mc_r9            uint64
   156		mc_rax           uint64
   157		mc_rbx           uint64
   158		mc_rbp           uint64
   159		mc_r10           uint64
   160		mc_r11           uint64
   161		mc_r12           uint64
   162		mc_r13           uint64
   163		mc_r14           uint64
   164		mc_r15           uint64
   165		mc_trapno        uint32
   166		mc_fs            uint16
   167		mc_gs            uint16
   168		mc_addr          uint64
   169		mc_flags         uint32
   170		mc_es            uint16
   171		mc_ds            uint16
   172		mc_err           uint64
   173		mc_rip           uint64
   174		mc_cs            uint64
   175		mc_rflags        uint64
   176		mc_rsp           uint64
   177		mc_ss            uint64
   178		mc_len           uint64
   179		mc_fpformat      uint64
   180		mc_ownedfp       uint64
   181		mc_fpstate       [64]uint64
   182		mc_fsbase        uint64
   183		mc_gsbase        uint64
   184		mc_xfpustate     uint64
   185		mc_xfpustate_len uint64
   186		mc_spare         [4]uint64
   187	}
   188	
   189	type ucontext struct {
   190		uc_sigmask  sigset
   191		uc_mcontext mcontext
   192		uc_link     *ucontext
   193		uc_stack    stackt
   194		uc_flags    int32
   195		__spare__   [4]int32
   196		pad_cgo_0   [12]byte
   197	}
   198	
   199	type timespec struct {
   200		tv_sec  int64
   201		tv_nsec int64
   202	}
   203	
   204	//go:nosplit
   205	func (ts *timespec) setNsec(ns int64) {
   206		ts.tv_sec = ns / 1e9
   207		ts.tv_nsec = ns % 1e9
   208	}
   209	
   210	type timeval struct {
   211		tv_sec  int64
   212		tv_usec int64
   213	}
   214	
   215	func (tv *timeval) set_usec(x int32) {
   216		tv.tv_usec = int64(x)
   217	}
   218	
   219	type itimerval struct {
   220		it_interval timeval
   221		it_value    timeval
   222	}
   223	
   224	type umtx_time struct {
   225		_timeout timespec
   226		_flags   uint32
   227		_clockid uint32
   228	}
   229	
   230	type keventt struct {
   231		ident  uint64
   232		filter int16
   233		flags  uint16
   234		fflags uint32
   235		data   int64
   236		udata  *byte
   237	}
   238	
   239	type bintime struct {
   240		sec  int64
   241		frac uint64
   242	}
   243	
   244	type vdsoTimehands struct {
   245		algo         uint32
   246		gen          uint32
   247		scale        uint64
   248		offset_count uint32
   249		counter_mask uint32
   250		offset       bintime
   251		boottime     bintime
   252		x86_shift    uint32
   253		x86_hpet_idx uint32
   254		res          [6]uint32
   255	}
   256	
   257	type vdsoTimekeep struct {
   258		ver       uint32
   259		enabled   uint32
   260		current   uint32
   261		pad_cgo_0 [4]byte
   262	}
   263	
   264	const (
   265		_VDSO_TK_VER_CURR = 0x1
   266	
   267		vdsoTimehandsSize = 0x58
   268		vdsoTimekeepSize  = 0x10
   269	)
   270	

View as plain text