github.com/likebike/go--@v0.0.0-20190911215757-0bd925d16e96/go/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.h> 19 #include <mach/message.h> 20 #include <sys/types.h> 21 #include <sys/time.h> 22 #include <errno.h> 23 #include <signal.h> 24 #include <sys/event.h> 25 #include <sys/mman.h> 26 */ 27 import "C" 28 29 const ( 30 EINTR = C.EINTR 31 EFAULT = C.EFAULT 32 33 PROT_NONE = C.PROT_NONE 34 PROT_READ = C.PROT_READ 35 PROT_WRITE = C.PROT_WRITE 36 PROT_EXEC = C.PROT_EXEC 37 38 MAP_ANON = C.MAP_ANON 39 MAP_PRIVATE = C.MAP_PRIVATE 40 MAP_FIXED = C.MAP_FIXED 41 42 MADV_DONTNEED = C.MADV_DONTNEED 43 MADV_FREE = C.MADV_FREE 44 45 MACH_MSG_TYPE_MOVE_RECEIVE = C.MACH_MSG_TYPE_MOVE_RECEIVE 46 MACH_MSG_TYPE_MOVE_SEND = C.MACH_MSG_TYPE_MOVE_SEND 47 MACH_MSG_TYPE_MOVE_SEND_ONCE = C.MACH_MSG_TYPE_MOVE_SEND_ONCE 48 MACH_MSG_TYPE_COPY_SEND = C.MACH_MSG_TYPE_COPY_SEND 49 MACH_MSG_TYPE_MAKE_SEND = C.MACH_MSG_TYPE_MAKE_SEND 50 MACH_MSG_TYPE_MAKE_SEND_ONCE = C.MACH_MSG_TYPE_MAKE_SEND_ONCE 51 MACH_MSG_TYPE_COPY_RECEIVE = C.MACH_MSG_TYPE_COPY_RECEIVE 52 53 MACH_MSG_PORT_DESCRIPTOR = C.MACH_MSG_PORT_DESCRIPTOR 54 MACH_MSG_OOL_DESCRIPTOR = C.MACH_MSG_OOL_DESCRIPTOR 55 MACH_MSG_OOL_PORTS_DESCRIPTOR = C.MACH_MSG_OOL_PORTS_DESCRIPTOR 56 MACH_MSG_OOL_VOLATILE_DESCRIPTOR = C.MACH_MSG_OOL_VOLATILE_DESCRIPTOR 57 58 MACH_MSGH_BITS_COMPLEX = C.MACH_MSGH_BITS_COMPLEX 59 60 MACH_SEND_MSG = C.MACH_SEND_MSG 61 MACH_RCV_MSG = C.MACH_RCV_MSG 62 MACH_RCV_LARGE = C.MACH_RCV_LARGE 63 64 MACH_SEND_TIMEOUT = C.MACH_SEND_TIMEOUT 65 MACH_SEND_INTERRUPT = C.MACH_SEND_INTERRUPT 66 MACH_SEND_ALWAYS = C.MACH_SEND_ALWAYS 67 MACH_SEND_TRAILER = C.MACH_SEND_TRAILER 68 MACH_RCV_TIMEOUT = C.MACH_RCV_TIMEOUT 69 MACH_RCV_NOTIFY = C.MACH_RCV_NOTIFY 70 MACH_RCV_INTERRUPT = C.MACH_RCV_INTERRUPT 71 MACH_RCV_OVERWRITE = C.MACH_RCV_OVERWRITE 72 73 NDR_PROTOCOL_2_0 = C.NDR_PROTOCOL_2_0 74 NDR_INT_BIG_ENDIAN = C.NDR_INT_BIG_ENDIAN 75 NDR_INT_LITTLE_ENDIAN = C.NDR_INT_LITTLE_ENDIAN 76 NDR_FLOAT_IEEE = C.NDR_FLOAT_IEEE 77 NDR_CHAR_ASCII = C.NDR_CHAR_ASCII 78 79 SA_SIGINFO = C.SA_SIGINFO 80 SA_RESTART = C.SA_RESTART 81 SA_ONSTACK = C.SA_ONSTACK 82 SA_USERTRAMP = C.SA_USERTRAMP 83 SA_64REGSET = C.SA_64REGSET 84 85 SIGHUP = C.SIGHUP 86 SIGINT = C.SIGINT 87 SIGQUIT = C.SIGQUIT 88 SIGILL = C.SIGILL 89 SIGTRAP = C.SIGTRAP 90 SIGABRT = C.SIGABRT 91 SIGEMT = C.SIGEMT 92 SIGFPE = C.SIGFPE 93 SIGKILL = C.SIGKILL 94 SIGBUS = C.SIGBUS 95 SIGSEGV = C.SIGSEGV 96 SIGSYS = C.SIGSYS 97 SIGPIPE = C.SIGPIPE 98 SIGALRM = C.SIGALRM 99 SIGTERM = C.SIGTERM 100 SIGURG = C.SIGURG 101 SIGSTOP = C.SIGSTOP 102 SIGTSTP = C.SIGTSTP 103 SIGCONT = C.SIGCONT 104 SIGCHLD = C.SIGCHLD 105 SIGTTIN = C.SIGTTIN 106 SIGTTOU = C.SIGTTOU 107 SIGIO = C.SIGIO 108 SIGXCPU = C.SIGXCPU 109 SIGXFSZ = C.SIGXFSZ 110 SIGVTALRM = C.SIGVTALRM 111 SIGPROF = C.SIGPROF 112 SIGWINCH = C.SIGWINCH 113 SIGINFO = C.SIGINFO 114 SIGUSR1 = C.SIGUSR1 115 SIGUSR2 = C.SIGUSR2 116 117 FPE_INTDIV = C.FPE_INTDIV 118 FPE_INTOVF = C.FPE_INTOVF 119 FPE_FLTDIV = C.FPE_FLTDIV 120 FPE_FLTOVF = C.FPE_FLTOVF 121 FPE_FLTUND = C.FPE_FLTUND 122 FPE_FLTRES = C.FPE_FLTRES 123 FPE_FLTINV = C.FPE_FLTINV 124 FPE_FLTSUB = C.FPE_FLTSUB 125 126 BUS_ADRALN = C.BUS_ADRALN 127 BUS_ADRERR = C.BUS_ADRERR 128 BUS_OBJERR = C.BUS_OBJERR 129 130 SEGV_MAPERR = C.SEGV_MAPERR 131 SEGV_ACCERR = C.SEGV_ACCERR 132 133 ITIMER_REAL = C.ITIMER_REAL 134 ITIMER_VIRTUAL = C.ITIMER_VIRTUAL 135 ITIMER_PROF = C.ITIMER_PROF 136 137 EV_ADD = C.EV_ADD 138 EV_DELETE = C.EV_DELETE 139 EV_CLEAR = C.EV_CLEAR 140 EV_RECEIPT = C.EV_RECEIPT 141 EV_ERROR = C.EV_ERROR 142 EV_EOF = C.EV_EOF 143 EVFILT_READ = C.EVFILT_READ 144 EVFILT_WRITE = C.EVFILT_WRITE 145 ) 146 147 type MachBody C.mach_msg_body_t 148 type MachHeader C.mach_msg_header_t 149 type MachNDR C.NDR_record_t 150 type MachPort C.mach_msg_port_descriptor_t 151 152 type StackT C.struct_sigaltstack 153 type Sighandler C.union___sigaction_u 154 155 type Sigaction C.struct___sigaction // used in syscalls 156 type Usigaction C.struct_sigaction // used by sigaction second argument 157 type Sigval C.union_sigval 158 type Siginfo C.siginfo_t 159 type Timeval C.struct_timeval 160 type Itimerval C.struct_itimerval 161 type Timespec C.struct_timespec 162 163 type FPControl C.struct_fp_control 164 type FPStatus C.struct_fp_status 165 type RegMMST C.struct_mmst_reg 166 type RegXMM C.struct_xmm_reg 167 168 type Regs64 C.struct_x86_thread_state64 169 type FloatState64 C.struct_x86_float_state64 170 type ExceptionState64 C.struct_x86_exception_state64 171 type Mcontext64 C.struct_mcontext64 172 173 type Regs32 C.struct_i386_thread_state 174 type FloatState32 C.struct_i386_float_state 175 type ExceptionState32 C.struct_i386_exception_state 176 type Mcontext32 C.struct_mcontext32 177 178 type Ucontext C.struct_ucontext 179 180 type Kevent C.struct_kevent