Black Lives Matter. Support the Equal Justice Initiative.

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

View as plain text