Home | History | Annotate | Download | only in 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 */
     35 import "C"
     36 
     37 // Local consts.
     38 const (
     39 	_NBBY            = C.NBBY            // Number of bits in a byte.
     40 	_CTL_MAXNAME     = C.CTL_MAXNAME     // Largest number of components supported.
     41 	_CPU_LEVEL_WHICH = C.CPU_LEVEL_WHICH // Actual mask/id for which.
     42 	_CPU_WHICH_PID   = C.CPU_WHICH_PID   // Specifies a process id.
     43 )
     44 
     45 const (
     46 	EINTR  = C.EINTR
     47 	EFAULT = C.EFAULT
     48 
     49 	PROT_NONE  = C.PROT_NONE
     50 	PROT_READ  = C.PROT_READ
     51 	PROT_WRITE = C.PROT_WRITE
     52 	PROT_EXEC  = C.PROT_EXEC
     53 
     54 	MAP_ANON    = C.MAP_ANON
     55 	MAP_PRIVATE = C.MAP_PRIVATE
     56 	MAP_FIXED   = C.MAP_FIXED
     57 
     58 	MADV_FREE = C.MADV_FREE
     59 
     60 	SA_SIGINFO = C.SA_SIGINFO
     61 	SA_RESTART = C.SA_RESTART
     62 	SA_ONSTACK = C.SA_ONSTACK
     63 
     64 	CLOCK_MONOTONIC = C.CLOCK_MONOTONIC
     65 
     66 	UMTX_OP_WAIT_UINT         = C.UMTX_OP_WAIT_UINT
     67 	UMTX_OP_WAIT_UINT_PRIVATE = C.UMTX_OP_WAIT_UINT_PRIVATE
     68 	UMTX_OP_WAKE              = C.UMTX_OP_WAKE
     69 	UMTX_OP_WAKE_PRIVATE      = C.UMTX_OP_WAKE_PRIVATE
     70 
     71 	SIGHUP    = C.SIGHUP
     72 	SIGINT    = C.SIGINT
     73 	SIGQUIT   = C.SIGQUIT
     74 	SIGILL    = C.SIGILL
     75 	SIGTRAP   = C.SIGTRAP
     76 	SIGABRT   = C.SIGABRT
     77 	SIGEMT    = C.SIGEMT
     78 	SIGFPE    = C.SIGFPE
     79 	SIGKILL   = C.SIGKILL
     80 	SIGBUS    = C.SIGBUS
     81 	SIGSEGV   = C.SIGSEGV
     82 	SIGSYS    = C.SIGSYS
     83 	SIGPIPE   = C.SIGPIPE
     84 	SIGALRM   = C.SIGALRM
     85 	SIGTERM   = C.SIGTERM
     86 	SIGURG    = C.SIGURG
     87 	SIGSTOP   = C.SIGSTOP
     88 	SIGTSTP   = C.SIGTSTP
     89 	SIGCONT   = C.SIGCONT
     90 	SIGCHLD   = C.SIGCHLD
     91 	SIGTTIN   = C.SIGTTIN
     92 	SIGTTOU   = C.SIGTTOU
     93 	SIGIO     = C.SIGIO
     94 	SIGXCPU   = C.SIGXCPU
     95 	SIGXFSZ   = C.SIGXFSZ
     96 	SIGVTALRM = C.SIGVTALRM
     97 	SIGPROF   = C.SIGPROF
     98 	SIGWINCH  = C.SIGWINCH
     99 	SIGINFO   = C.SIGINFO
    100 	SIGUSR1   = C.SIGUSR1
    101 	SIGUSR2   = C.SIGUSR2
    102 
    103 	FPE_INTDIV = C.FPE_INTDIV
    104 	FPE_INTOVF = C.FPE_INTOVF
    105 	FPE_FLTDIV = C.FPE_FLTDIV
    106 	FPE_FLTOVF = C.FPE_FLTOVF
    107 	FPE_FLTUND = C.FPE_FLTUND
    108 	FPE_FLTRES = C.FPE_FLTRES
    109 	FPE_FLTINV = C.FPE_FLTINV
    110 	FPE_FLTSUB = C.FPE_FLTSUB
    111 
    112 	BUS_ADRALN = C.BUS_ADRALN
    113 	BUS_ADRERR = C.BUS_ADRERR
    114 	BUS_OBJERR = C.BUS_OBJERR
    115 
    116 	SEGV_MAPERR = C.SEGV_MAPERR
    117 	SEGV_ACCERR = C.SEGV_ACCERR
    118 
    119 	ITIMER_REAL    = C.ITIMER_REAL
    120 	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
    121 	ITIMER_PROF    = C.ITIMER_PROF
    122 
    123 	EV_ADD       = C.EV_ADD
    124 	EV_DELETE    = C.EV_DELETE
    125 	EV_CLEAR     = C.EV_CLEAR
    126 	EV_RECEIPT   = C.EV_RECEIPT
    127 	EV_ERROR     = C.EV_ERROR
    128 	EV_EOF       = C.EV_EOF
    129 	EVFILT_READ  = C.EVFILT_READ
    130 	EVFILT_WRITE = C.EVFILT_WRITE
    131 )
    132 
    133 type Rtprio C.struct_rtprio
    134 type ThrParam C.struct_thr_param
    135 type Sigset C.struct___sigset
    136 type StackT C.stack_t
    137 
    138 type Siginfo C.siginfo_t
    139 
    140 type Mcontext C.mcontext_t
    141 type Ucontext C.ucontext_t
    142 
    143 type Timespec C.struct_timespec
    144 type Timeval C.struct_timeval
    145 type Itimerval C.struct_itimerval
    146 
    147 type Umtx_time C.struct__umtx_time
    148 
    149 type Kevent C.struct_kevent
    150