...
Run Format

Source file src/runtime/defs_freebsd.go

Documentation: runtime

     1  // Copyright 2009 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build ignore
     6  
     7  /*
     8  Input to cgo.
     9  
    10  GOARCH=amd64 go tool cgo -cdefs defs_freebsd.go >defs_freebsd_amd64.h
    11  GOARCH=386 go tool cgo -cdefs defs_freebsd.go >defs_freebsd_386.h
    12  GOARCH=arm go tool cgo -cdefs defs_freebsd.go >defs_freebsd_arm.h
    13  */
    14  
    15  package runtime
    16  
    17  /*
    18  #include <sys/types.h>
    19  #include <sys/time.h>
    20  #include <signal.h>
    21  #include <errno.h>
    22  #include <sys/event.h>
    23  #include <sys/mman.h>
    24  #include <sys/ucontext.h>
    25  #include <sys/umtx.h>
    26  #include <sys/_umtx.h>
    27  #include <sys/rtprio.h>
    28  #include <sys/thr.h>
    29  #include <sys/_sigset.h>
    30  #include <sys/unistd.h>
    31  #include <sys/sysctl.h>
    32  #include <sys/cpuset.h>
    33  #include <sys/param.h>
    34  #include <sys/vdso.h>
    35  */
    36  import "C"
    37  
    38  // Local consts.
    39  const (
    40  	_NBBY            = C.NBBY            // Number of bits in a byte.
    41  	_CTL_MAXNAME     = C.CTL_MAXNAME     // Largest number of components supported.
    42  	_CPU_LEVEL_WHICH = C.CPU_LEVEL_WHICH // Actual mask/id for which.
    43  	_CPU_WHICH_PID   = C.CPU_WHICH_PID   // Specifies a process id.
    44  )
    45  
    46  const (
    47  	EINTR  = C.EINTR
    48  	EFAULT = C.EFAULT
    49  
    50  	PROT_NONE  = C.PROT_NONE
    51  	PROT_READ  = C.PROT_READ
    52  	PROT_WRITE = C.PROT_WRITE
    53  	PROT_EXEC  = C.PROT_EXEC
    54  
    55  	MAP_ANON    = C.MAP_ANON
    56  	MAP_SHARED  = C.MAP_SHARED
    57  	MAP_PRIVATE = C.MAP_PRIVATE
    58  	MAP_FIXED   = C.MAP_FIXED
    59  
    60  	MADV_FREE = C.MADV_FREE
    61  
    62  	SA_SIGINFO = C.SA_SIGINFO
    63  	SA_RESTART = C.SA_RESTART
    64  	SA_ONSTACK = C.SA_ONSTACK
    65  
    66  	CLOCK_MONOTONIC = C.CLOCK_MONOTONIC
    67  	CLOCK_REALTIME  = C.CLOCK_REALTIME
    68  
    69  	UMTX_OP_WAIT_UINT         = C.UMTX_OP_WAIT_UINT
    70  	UMTX_OP_WAIT_UINT_PRIVATE = C.UMTX_OP_WAIT_UINT_PRIVATE
    71  	UMTX_OP_WAKE              = C.UMTX_OP_WAKE
    72  	UMTX_OP_WAKE_PRIVATE      = C.UMTX_OP_WAKE_PRIVATE
    73  
    74  	SIGHUP    = C.SIGHUP
    75  	SIGINT    = C.SIGINT
    76  	SIGQUIT   = C.SIGQUIT
    77  	SIGILL    = C.SIGILL
    78  	SIGTRAP   = C.SIGTRAP
    79  	SIGABRT   = C.SIGABRT
    80  	SIGEMT    = C.SIGEMT
    81  	SIGFPE    = C.SIGFPE
    82  	SIGKILL   = C.SIGKILL
    83  	SIGBUS    = C.SIGBUS
    84  	SIGSEGV   = C.SIGSEGV
    85  	SIGSYS    = C.SIGSYS
    86  	SIGPIPE   = C.SIGPIPE
    87  	SIGALRM   = C.SIGALRM
    88  	SIGTERM   = C.SIGTERM
    89  	SIGURG    = C.SIGURG
    90  	SIGSTOP   = C.SIGSTOP
    91  	SIGTSTP   = C.SIGTSTP
    92  	SIGCONT   = C.SIGCONT
    93  	SIGCHLD   = C.SIGCHLD
    94  	SIGTTIN   = C.SIGTTIN
    95  	SIGTTOU   = C.SIGTTOU
    96  	SIGIO     = C.SIGIO
    97  	SIGXCPU   = C.SIGXCPU
    98  	SIGXFSZ   = C.SIGXFSZ
    99  	SIGVTALRM = C.SIGVTALRM
   100  	SIGPROF   = C.SIGPROF
   101  	SIGWINCH  = C.SIGWINCH
   102  	SIGINFO   = C.SIGINFO
   103  	SIGUSR1   = C.SIGUSR1
   104  	SIGUSR2   = C.SIGUSR2
   105  
   106  	FPE_INTDIV = C.FPE_INTDIV
   107  	FPE_INTOVF = C.FPE_INTOVF
   108  	FPE_FLTDIV = C.FPE_FLTDIV
   109  	FPE_FLTOVF = C.FPE_FLTOVF
   110  	FPE_FLTUND = C.FPE_FLTUND
   111  	FPE_FLTRES = C.FPE_FLTRES
   112  	FPE_FLTINV = C.FPE_FLTINV
   113  	FPE_FLTSUB = C.FPE_FLTSUB
   114  
   115  	BUS_ADRALN = C.BUS_ADRALN
   116  	BUS_ADRERR = C.BUS_ADRERR
   117  	BUS_OBJERR = C.BUS_OBJERR
   118  
   119  	SEGV_MAPERR = C.SEGV_MAPERR
   120  	SEGV_ACCERR = C.SEGV_ACCERR
   121  
   122  	ITIMER_REAL    = C.ITIMER_REAL
   123  	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
   124  	ITIMER_PROF    = C.ITIMER_PROF
   125  
   126  	EV_ADD       = C.EV_ADD
   127  	EV_DELETE    = C.EV_DELETE
   128  	EV_CLEAR     = C.EV_CLEAR
   129  	EV_RECEIPT   = C.EV_RECEIPT
   130  	EV_ERROR     = C.EV_ERROR
   131  	EV_EOF       = C.EV_EOF
   132  	EVFILT_READ  = C.EVFILT_READ
   133  	EVFILT_WRITE = C.EVFILT_WRITE
   134  )
   135  
   136  type Rtprio C.struct_rtprio
   137  type ThrParam C.struct_thr_param
   138  type Sigset C.struct___sigset
   139  type StackT C.stack_t
   140  
   141  type Siginfo C.siginfo_t
   142  
   143  type Mcontext C.mcontext_t
   144  type Ucontext C.ucontext_t
   145  
   146  type Timespec C.struct_timespec
   147  type Timeval C.struct_timeval
   148  type Itimerval C.struct_itimerval
   149  
   150  type Umtx_time C.struct__umtx_time
   151  
   152  type Kevent C.struct_kevent
   153  
   154  type bintime C.struct_bintime
   155  type vdsoTimehands C.struct_vdso_timehands
   156  type vdsoTimekeep C.struct_vdso_timekeep
   157  
   158  const (
   159  	_VDSO_TK_VER_CURR = C.VDSO_TK_VER_CURR
   160  
   161  	vdsoTimehandsSize = C.sizeof_struct_vdso_timehands
   162  	vdsoTimekeepSize  = C.sizeof_struct_vdso_timekeep
   163  )
   164  

View as plain text