github.com/hikaru7719/go@v0.0.0-20181025140707-c8b2ac68906a/src/runtime/defs_darwin.go (about) 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_darwin.go >defs_darwin_amd64.h 11 GOARCH=386 go tool cgo -cdefs defs_darwin.go >defs_darwin_386.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 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 47 SA_SIGINFO = C.SA_SIGINFO 48 SA_RESTART = C.SA_RESTART 49 SA_ONSTACK = C.SA_ONSTACK 50 SA_USERTRAMP = C.SA_USERTRAMP 51 SA_64REGSET = C.SA_64REGSET 52 53 SIGHUP = C.SIGHUP 54 SIGINT = C.SIGINT 55 SIGQUIT = C.SIGQUIT 56 SIGILL = C.SIGILL 57 SIGTRAP = C.SIGTRAP 58 SIGABRT = C.SIGABRT 59 SIGEMT = C.SIGEMT 60 SIGFPE = C.SIGFPE 61 SIGKILL = C.SIGKILL 62 SIGBUS = C.SIGBUS 63 SIGSEGV = C.SIGSEGV 64 SIGSYS = C.SIGSYS 65 SIGPIPE = C.SIGPIPE 66 SIGALRM = C.SIGALRM 67 SIGTERM = C.SIGTERM 68 SIGURG = C.SIGURG 69 SIGSTOP = C.SIGSTOP 70 SIGTSTP = C.SIGTSTP 71 SIGCONT = C.SIGCONT 72 SIGCHLD = C.SIGCHLD 73 SIGTTIN = C.SIGTTIN 74 SIGTTOU = C.SIGTTOU 75 SIGIO = C.SIGIO 76 SIGXCPU = C.SIGXCPU 77 SIGXFSZ = C.SIGXFSZ 78 SIGVTALRM = C.SIGVTALRM 79 SIGPROF = C.SIGPROF 80 SIGWINCH = C.SIGWINCH 81 SIGINFO = C.SIGINFO 82 SIGUSR1 = C.SIGUSR1 83 SIGUSR2 = C.SIGUSR2 84 85 FPE_INTDIV = C.FPE_INTDIV 86 FPE_INTOVF = C.FPE_INTOVF 87 FPE_FLTDIV = C.FPE_FLTDIV 88 FPE_FLTOVF = C.FPE_FLTOVF 89 FPE_FLTUND = C.FPE_FLTUND 90 FPE_FLTRES = C.FPE_FLTRES 91 FPE_FLTINV = C.FPE_FLTINV 92 FPE_FLTSUB = C.FPE_FLTSUB 93 94 BUS_ADRALN = C.BUS_ADRALN 95 BUS_ADRERR = C.BUS_ADRERR 96 BUS_OBJERR = C.BUS_OBJERR 97 98 SEGV_MAPERR = C.SEGV_MAPERR 99 SEGV_ACCERR = C.SEGV_ACCERR 100 101 ITIMER_REAL = C.ITIMER_REAL 102 ITIMER_VIRTUAL = C.ITIMER_VIRTUAL 103 ITIMER_PROF = C.ITIMER_PROF 104 105 EV_ADD = C.EV_ADD 106 EV_DELETE = C.EV_DELETE 107 EV_CLEAR = C.EV_CLEAR 108 EV_RECEIPT = C.EV_RECEIPT 109 EV_ERROR = C.EV_ERROR 110 EV_EOF = C.EV_EOF 111 EVFILT_READ = C.EVFILT_READ 112 EVFILT_WRITE = C.EVFILT_WRITE 113 114 PTHREAD_CREATE_DETACHED = C.PTHREAD_CREATE_DETACHED 115 116 F_SETFD = C.F_SETFD 117 FD_CLOEXEC = C.FD_CLOEXEC 118 ) 119 120 type StackT C.struct_sigaltstack 121 type Sighandler C.union___sigaction_u 122 123 type Sigaction C.struct___sigaction // used in syscalls 124 type Usigaction C.struct_sigaction // used by sigaction second argument 125 type Sigset C.sigset_t 126 type Sigval C.union_sigval 127 type Siginfo C.siginfo_t 128 type Timeval C.struct_timeval 129 type Itimerval C.struct_itimerval 130 type Timespec C.struct_timespec 131 132 type FPControl C.struct_fp_control 133 type FPStatus C.struct_fp_status 134 type RegMMST C.struct_mmst_reg 135 type RegXMM C.struct_xmm_reg 136 137 type Regs64 C.struct_x86_thread_state64 138 type FloatState64 C.struct_x86_float_state64 139 type ExceptionState64 C.struct_x86_exception_state64 140 type Mcontext64 C.struct_mcontext64 141 142 type Regs32 C.struct_i386_thread_state 143 type FloatState32 C.struct_i386_float_state 144 type ExceptionState32 C.struct_i386_exception_state 145 type Mcontext32 C.struct_mcontext32 146 147 type Ucontext C.struct_ucontext 148 149 type Kevent C.struct_kevent 150 151 type Pthread C.pthread_t 152 type PthreadAttr C.pthread_attr_t 153 type PthreadMutex C.pthread_mutex_t 154 type PthreadMutexAttr C.pthread_mutexattr_t 155 type PthreadCond C.pthread_cond_t 156 type PthreadCondAttr C.pthread_condattr_t 157 158 type MachTimebaseInfo C.mach_timebase_info_data_t