Source file src/runtime/defs_darwin.go

     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  //go:build ignore
     6  
     7  /*
     8  Input to cgo.
     9  
    10  GOARCH=amd64 go tool cgo -cdefs defs_darwin.go >defs_darwin_amd64.h
    11  */
    12  
    13  package runtime
    14  
    15  /*
    16  #define __DARWIN_UNIX03 0
    17  #include <mach/mach_time.h>
    18  #include <sys/types.h>
    19  #include <sys/time.h>
    20  #include <errno.h>
    21  #include <signal.h>
    22  #include <sys/event.h>
    23  #include <sys/mman.h>
    24  #include <pthread.h>
    25  #include <fcntl.h>
    26  */
    27  import "C"
    28  
    29  const (
    30  	EINTR     = C.EINTR
    31  	EFAULT    = C.EFAULT
    32  	EAGAIN    = C.EAGAIN
    33  	ETIMEDOUT = C.ETIMEDOUT
    34  
    35  	PROT_NONE  = C.PROT_NONE
    36  	PROT_READ  = C.PROT_READ
    37  	PROT_WRITE = C.PROT_WRITE
    38  	PROT_EXEC  = C.PROT_EXEC
    39  
    40  	MAP_ANON    = C.MAP_ANON
    41  	MAP_PRIVATE = C.MAP_PRIVATE
    42  	MAP_FIXED   = C.MAP_FIXED
    43  
    44  	MADV_DONTNEED      = C.MADV_DONTNEED
    45  	MADV_FREE          = C.MADV_FREE
    46  	MADV_FREE_REUSABLE = C.MADV_FREE_REUSABLE
    47  	MADV_FREE_REUSE    = C.MADV_FREE_REUSE
    48  
    49  	SA_SIGINFO   = C.SA_SIGINFO
    50  	SA_RESTART   = C.SA_RESTART
    51  	SA_ONSTACK   = C.SA_ONSTACK
    52  	SA_USERTRAMP = C.SA_USERTRAMP
    53  	SA_64REGSET  = C.SA_64REGSET
    54  
    55  	SIGHUP    = C.SIGHUP
    56  	SIGINT    = C.SIGINT
    57  	SIGQUIT   = C.SIGQUIT
    58  	SIGILL    = C.SIGILL
    59  	SIGTRAP   = C.SIGTRAP
    60  	SIGABRT   = C.SIGABRT
    61  	SIGEMT    = C.SIGEMT
    62  	SIGFPE    = C.SIGFPE
    63  	SIGKILL   = C.SIGKILL
    64  	SIGBUS    = C.SIGBUS
    65  	SIGSEGV   = C.SIGSEGV
    66  	SIGSYS    = C.SIGSYS
    67  	SIGPIPE   = C.SIGPIPE
    68  	SIGALRM   = C.SIGALRM
    69  	SIGTERM   = C.SIGTERM
    70  	SIGURG    = C.SIGURG
    71  	SIGSTOP   = C.SIGSTOP
    72  	SIGTSTP   = C.SIGTSTP
    73  	SIGCONT   = C.SIGCONT
    74  	SIGCHLD   = C.SIGCHLD
    75  	SIGTTIN   = C.SIGTTIN
    76  	SIGTTOU   = C.SIGTTOU
    77  	SIGIO     = C.SIGIO
    78  	SIGXCPU   = C.SIGXCPU
    79  	SIGXFSZ   = C.SIGXFSZ
    80  	SIGVTALRM = C.SIGVTALRM
    81  	SIGPROF   = C.SIGPROF
    82  	SIGWINCH  = C.SIGWINCH
    83  	SIGINFO   = C.SIGINFO
    84  	SIGUSR1   = C.SIGUSR1
    85  	SIGUSR2   = C.SIGUSR2
    86  
    87  	FPE_INTDIV = C.FPE_INTDIV
    88  	FPE_INTOVF = C.FPE_INTOVF
    89  	FPE_FLTDIV = C.FPE_FLTDIV
    90  	FPE_FLTOVF = C.FPE_FLTOVF
    91  	FPE_FLTUND = C.FPE_FLTUND
    92  	FPE_FLTRES = C.FPE_FLTRES
    93  	FPE_FLTINV = C.FPE_FLTINV
    94  	FPE_FLTSUB = C.FPE_FLTSUB
    95  
    96  	BUS_ADRALN = C.BUS_ADRALN
    97  	BUS_ADRERR = C.BUS_ADRERR
    98  	BUS_OBJERR = C.BUS_OBJERR
    99  
   100  	SEGV_MAPERR = C.SEGV_MAPERR
   101  	SEGV_ACCERR = C.SEGV_ACCERR
   102  
   103  	ITIMER_REAL    = C.ITIMER_REAL
   104  	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
   105  	ITIMER_PROF    = C.ITIMER_PROF
   106  
   107  	EV_ADD       = C.EV_ADD
   108  	EV_DELETE    = C.EV_DELETE
   109  	EV_ENABLE    = C.EV_ENABLE
   110  	EV_DISABLE   = C.EV_DISABLE
   111  	EV_CLEAR     = C.EV_CLEAR
   112  	EV_RECEIPT   = C.EV_RECEIPT
   113  	EV_ERROR     = C.EV_ERROR
   114  	EV_EOF       = C.EV_EOF
   115  	EVFILT_READ  = C.EVFILT_READ
   116  	EVFILT_WRITE = C.EVFILT_WRITE
   117  	EVFILT_USER  = C.EVFILT_USER
   118  
   119  	NOTE_TRIGGER = C.NOTE_TRIGGER
   120  
   121  	PTHREAD_CREATE_DETACHED = C.PTHREAD_CREATE_DETACHED
   122  
   123  	F_GETFL = C.F_GETFL
   124  	F_SETFL = C.F_SETFL
   125  
   126  	O_WRONLY   = C.O_WRONLY
   127  	O_NONBLOCK = C.O_NONBLOCK
   128  	O_CREAT    = C.O_CREAT
   129  	O_TRUNC    = C.O_TRUNC
   130  
   131  	VM_REGION_BASIC_INFO_COUNT_64 = C.VM_REGION_BASIC_INFO_COUNT_64
   132  	VM_REGION_BASIC_INFO_64       = C.VM_REGION_BASIC_INFO_64
   133  )
   134  
   135  type StackT C.struct_sigaltstack
   136  type Sighandler C.union___sigaction_u
   137  
   138  type Sigaction C.struct___sigaction // used in syscalls
   139  type Usigaction C.struct_sigaction  // used by sigaction second argument
   140  type Sigset C.sigset_t
   141  type Sigval C.union_sigval
   142  type Siginfo C.siginfo_t
   143  type Timeval C.struct_timeval
   144  type Itimerval C.struct_itimerval
   145  type Timespec C.struct_timespec
   146  
   147  type FPControl C.struct_fp_control
   148  type FPStatus C.struct_fp_status
   149  type RegMMST C.struct_mmst_reg
   150  type RegXMM C.struct_xmm_reg
   151  
   152  type Regs64 C.struct_x86_thread_state64
   153  type FloatState64 C.struct_x86_float_state64
   154  type ExceptionState64 C.struct_x86_exception_state64
   155  type Mcontext64 C.struct_mcontext64
   156  
   157  type Regs32 C.struct_i386_thread_state
   158  type FloatState32 C.struct_i386_float_state
   159  type ExceptionState32 C.struct_i386_exception_state
   160  type Mcontext32 C.struct_mcontext32
   161  
   162  type Ucontext C.struct_ucontext
   163  
   164  type Kevent C.struct_kevent
   165  
   166  type Pthread C.pthread_t
   167  type PthreadAttr C.pthread_attr_t
   168  type PthreadMutex C.pthread_mutex_t
   169  type PthreadMutexAttr C.pthread_mutexattr_t
   170  type PthreadCond C.pthread_cond_t
   171  type PthreadCondAttr C.pthread_condattr_t
   172  
   173  type MachTimebaseInfo C.mach_timebase_info_data_t
   174  
   175  type MachPort C.mach_port_t
   176  type MachVMMapRead C.vm_map_read_t
   177  type MachVMAddress C.mach_vm_address_t
   178  type MachVMSize C.mach_vm_size_t
   179  type MachVMRegionFlavour C.vm_region_flavor_t
   180  type MachVMRegionInfo C.vm_region_info_t
   181  type MachMsgTypeNumber C.mach_msg_type_number_t
   182  

View as plain text