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_openbsd.go >defs_openbsd_amd64.h
     11 GOARCH=386 go tool cgo -cdefs defs_openbsd.go >defs_openbsd_386.h
     12 */
     13 
     14 package runtime
     15 
     16 /*
     17 #include <sys/types.h>
     18 #include <sys/event.h>
     19 #include <sys/mman.h>
     20 #include <sys/time.h>
     21 #include <sys/unistd.h>
     22 #include <sys/signal.h>
     23 #include <errno.h>
     24 #include <signal.h>
     25 */
     26 import "C"
     27 
     28 const (
     29 	EINTR  = C.EINTR
     30 	EFAULT = C.EFAULT
     31 
     32 	PROT_NONE  = C.PROT_NONE
     33 	PROT_READ  = C.PROT_READ
     34 	PROT_WRITE = C.PROT_WRITE
     35 	PROT_EXEC  = C.PROT_EXEC
     36 
     37 	MAP_ANON    = C.MAP_ANON
     38 	MAP_PRIVATE = C.MAP_PRIVATE
     39 	MAP_FIXED   = C.MAP_FIXED
     40 
     41 	MADV_FREE = C.MADV_FREE
     42 
     43 	SA_SIGINFO = C.SA_SIGINFO
     44 	SA_RESTART = C.SA_RESTART
     45 	SA_ONSTACK = C.SA_ONSTACK
     46 
     47 	SIGHUP    = C.SIGHUP
     48 	SIGINT    = C.SIGINT
     49 	SIGQUIT   = C.SIGQUIT
     50 	SIGILL    = C.SIGILL
     51 	SIGTRAP   = C.SIGTRAP
     52 	SIGABRT   = C.SIGABRT
     53 	SIGEMT    = C.SIGEMT
     54 	SIGFPE    = C.SIGFPE
     55 	SIGKILL   = C.SIGKILL
     56 	SIGBUS    = C.SIGBUS
     57 	SIGSEGV   = C.SIGSEGV
     58 	SIGSYS    = C.SIGSYS
     59 	SIGPIPE   = C.SIGPIPE
     60 	SIGALRM   = C.SIGALRM
     61 	SIGTERM   = C.SIGTERM
     62 	SIGURG    = C.SIGURG
     63 	SIGSTOP   = C.SIGSTOP
     64 	SIGTSTP   = C.SIGTSTP
     65 	SIGCONT   = C.SIGCONT
     66 	SIGCHLD   = C.SIGCHLD
     67 	SIGTTIN   = C.SIGTTIN
     68 	SIGTTOU   = C.SIGTTOU
     69 	SIGIO     = C.SIGIO
     70 	SIGXCPU   = C.SIGXCPU
     71 	SIGXFSZ   = C.SIGXFSZ
     72 	SIGVTALRM = C.SIGVTALRM
     73 	SIGPROF   = C.SIGPROF
     74 	SIGWINCH  = C.SIGWINCH
     75 	SIGINFO   = C.SIGINFO
     76 	SIGUSR1   = C.SIGUSR1
     77 	SIGUSR2   = C.SIGUSR2
     78 
     79 	FPE_INTDIV = C.FPE_INTDIV
     80 	FPE_INTOVF = C.FPE_INTOVF
     81 	FPE_FLTDIV = C.FPE_FLTDIV
     82 	FPE_FLTOVF = C.FPE_FLTOVF
     83 	FPE_FLTUND = C.FPE_FLTUND
     84 	FPE_FLTRES = C.FPE_FLTRES
     85 	FPE_FLTINV = C.FPE_FLTINV
     86 	FPE_FLTSUB = C.FPE_FLTSUB
     87 
     88 	BUS_ADRALN = C.BUS_ADRALN
     89 	BUS_ADRERR = C.BUS_ADRERR
     90 	BUS_OBJERR = C.BUS_OBJERR
     91 
     92 	SEGV_MAPERR = C.SEGV_MAPERR
     93 	SEGV_ACCERR = C.SEGV_ACCERR
     94 
     95 	ITIMER_REAL    = C.ITIMER_REAL
     96 	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
     97 	ITIMER_PROF    = C.ITIMER_PROF
     98 
     99 	EV_ADD       = C.EV_ADD
    100 	EV_DELETE    = C.EV_DELETE
    101 	EV_CLEAR     = C.EV_CLEAR
    102 	EV_ERROR     = C.EV_ERROR
    103 	EVFILT_READ  = C.EVFILT_READ
    104 	EVFILT_WRITE = C.EVFILT_WRITE
    105 )
    106 
    107 type TforkT C.struct___tfork
    108 
    109 type SigaltstackT C.struct_sigaltstack
    110 type Sigcontext C.struct_sigcontext
    111 type Siginfo C.siginfo_t
    112 type Sigset C.sigset_t
    113 type Sigval C.union_sigval
    114 
    115 type StackT C.stack_t
    116 
    117 type Timespec C.struct_timespec
    118 type Timeval C.struct_timeval
    119 type Itimerval C.struct_itimerval
    120 
    121 type KeventT C.struct_kevent
    122