Source file src/runtime/defs_darwin_amd64.go

     1  // created by cgo -cdefs and then converted to Go
     2  // cgo -cdefs defs_darwin.go
     3  
     4  package runtime
     5  
     6  import "unsafe"
     7  
     8  const (
     9  	_EINTR     = 0x4
    10  	_EFAULT    = 0xe
    11  	_EAGAIN    = 0x23
    12  	_ETIMEDOUT = 0x3c
    13  
    14  	_PROT_NONE  = 0x0
    15  	_PROT_READ  = 0x1
    16  	_PROT_WRITE = 0x2
    17  	_PROT_EXEC  = 0x4
    18  
    19  	_MAP_ANON    = 0x1000
    20  	_MAP_PRIVATE = 0x2
    21  	_MAP_FIXED   = 0x10
    22  
    23  	_MADV_DONTNEED      = 0x4
    24  	_MADV_FREE          = 0x5
    25  	_MADV_FREE_REUSABLE = 0x7
    26  	_MADV_FREE_REUSE    = 0x8
    27  
    28  	_SA_SIGINFO   = 0x40
    29  	_SA_RESTART   = 0x2
    30  	_SA_ONSTACK   = 0x1
    31  	_SA_USERTRAMP = 0x100
    32  	_SA_64REGSET  = 0x200
    33  
    34  	_SIGHUP    = 0x1
    35  	_SIGINT    = 0x2
    36  	_SIGQUIT   = 0x3
    37  	_SIGILL    = 0x4
    38  	_SIGTRAP   = 0x5
    39  	_SIGABRT   = 0x6
    40  	_SIGEMT    = 0x7
    41  	_SIGFPE    = 0x8
    42  	_SIGKILL   = 0x9
    43  	_SIGBUS    = 0xa
    44  	_SIGSEGV   = 0xb
    45  	_SIGSYS    = 0xc
    46  	_SIGPIPE   = 0xd
    47  	_SIGALRM   = 0xe
    48  	_SIGTERM   = 0xf
    49  	_SIGURG    = 0x10
    50  	_SIGSTOP   = 0x11
    51  	_SIGTSTP   = 0x12
    52  	_SIGCONT   = 0x13
    53  	_SIGCHLD   = 0x14
    54  	_SIGTTIN   = 0x15
    55  	_SIGTTOU   = 0x16
    56  	_SIGIO     = 0x17
    57  	_SIGXCPU   = 0x18
    58  	_SIGXFSZ   = 0x19
    59  	_SIGVTALRM = 0x1a
    60  	_SIGPROF   = 0x1b
    61  	_SIGWINCH  = 0x1c
    62  	_SIGINFO   = 0x1d
    63  	_SIGUSR1   = 0x1e
    64  	_SIGUSR2   = 0x1f
    65  
    66  	_FPE_INTDIV = 0x7
    67  	_FPE_INTOVF = 0x8
    68  	_FPE_FLTDIV = 0x1
    69  	_FPE_FLTOVF = 0x2
    70  	_FPE_FLTUND = 0x3
    71  	_FPE_FLTRES = 0x4
    72  	_FPE_FLTINV = 0x5
    73  	_FPE_FLTSUB = 0x6
    74  
    75  	_BUS_ADRALN = 0x1
    76  	_BUS_ADRERR = 0x2
    77  	_BUS_OBJERR = 0x3
    78  
    79  	_SEGV_MAPERR = 0x1
    80  	_SEGV_ACCERR = 0x2
    81  
    82  	_ITIMER_REAL    = 0x0
    83  	_ITIMER_VIRTUAL = 0x1
    84  	_ITIMER_PROF    = 0x2
    85  
    86  	_EV_ADD       = 0x1
    87  	_EV_DELETE    = 0x2
    88  	_EV_CLEAR     = 0x20
    89  	_EV_RECEIPT   = 0x40
    90  	_EV_ERROR     = 0x4000
    91  	_EV_EOF       = 0x8000
    92  	_EVFILT_READ  = -0x1
    93  	_EVFILT_WRITE = -0x2
    94  
    95  	_PTHREAD_CREATE_DETACHED = 0x2
    96  
    97  	_F_SETFD    = 0x2
    98  	_F_GETFL    = 0x3
    99  	_F_SETFL    = 0x4
   100  	_FD_CLOEXEC = 0x1
   101  
   102  	_O_NONBLOCK = 4
   103  )
   104  
   105  type stackt struct {
   106  	ss_sp     *byte
   107  	ss_size   uintptr
   108  	ss_flags  int32
   109  	pad_cgo_0 [4]byte
   110  }
   111  
   112  type sigactiont struct {
   113  	__sigaction_u [8]byte
   114  	sa_tramp      unsafe.Pointer
   115  	sa_mask       uint32
   116  	sa_flags      int32
   117  }
   118  
   119  type usigactiont struct {
   120  	__sigaction_u [8]byte
   121  	sa_mask       uint32
   122  	sa_flags      int32
   123  }
   124  
   125  type siginfo struct {
   126  	si_signo  int32
   127  	si_errno  int32
   128  	si_code   int32
   129  	si_pid    int32
   130  	si_uid    uint32
   131  	si_status int32
   132  	si_addr   uint64
   133  	si_value  [8]byte
   134  	si_band   int64
   135  	__pad     [7]uint64
   136  }
   137  
   138  type timeval struct {
   139  	tv_sec    int64
   140  	tv_usec   int32
   141  	pad_cgo_0 [4]byte
   142  }
   143  
   144  func (tv *timeval) set_usec(x int32) {
   145  	tv.tv_usec = x
   146  }
   147  
   148  type itimerval struct {
   149  	it_interval timeval
   150  	it_value    timeval
   151  }
   152  
   153  type timespec struct {
   154  	tv_sec  int64
   155  	tv_nsec int64
   156  }
   157  
   158  //go:nosplit
   159  func (ts *timespec) setNsec(ns int64) {
   160  	ts.tv_sec = ns / 1e9
   161  	ts.tv_nsec = ns % 1e9
   162  }
   163  
   164  type fpcontrol struct {
   165  	pad_cgo_0 [2]byte
   166  }
   167  
   168  type fpstatus struct {
   169  	pad_cgo_0 [2]byte
   170  }
   171  
   172  type regmmst struct {
   173  	mmst_reg  [10]int8
   174  	mmst_rsrv [6]int8
   175  }
   176  
   177  type regxmm struct {
   178  	xmm_reg [16]int8
   179  }
   180  
   181  type regs64 struct {
   182  	rax    uint64
   183  	rbx    uint64
   184  	rcx    uint64
   185  	rdx    uint64
   186  	rdi    uint64
   187  	rsi    uint64
   188  	rbp    uint64
   189  	rsp    uint64
   190  	r8     uint64
   191  	r9     uint64
   192  	r10    uint64
   193  	r11    uint64
   194  	r12    uint64
   195  	r13    uint64
   196  	r14    uint64
   197  	r15    uint64
   198  	rip    uint64
   199  	rflags uint64
   200  	cs     uint64
   201  	fs     uint64
   202  	gs     uint64
   203  }
   204  
   205  type floatstate64 struct {
   206  	fpu_reserved  [2]int32
   207  	fpu_fcw       fpcontrol
   208  	fpu_fsw       fpstatus
   209  	fpu_ftw       uint8
   210  	fpu_rsrv1     uint8
   211  	fpu_fop       uint16
   212  	fpu_ip        uint32
   213  	fpu_cs        uint16
   214  	fpu_rsrv2     uint16
   215  	fpu_dp        uint32
   216  	fpu_ds        uint16
   217  	fpu_rsrv3     uint16
   218  	fpu_mxcsr     uint32
   219  	fpu_mxcsrmask uint32
   220  	fpu_stmm0     regmmst
   221  	fpu_stmm1     regmmst
   222  	fpu_stmm2     regmmst
   223  	fpu_stmm3     regmmst
   224  	fpu_stmm4     regmmst
   225  	fpu_stmm5     regmmst
   226  	fpu_stmm6     regmmst
   227  	fpu_stmm7     regmmst
   228  	fpu_xmm0      regxmm
   229  	fpu_xmm1      regxmm
   230  	fpu_xmm2      regxmm
   231  	fpu_xmm3      regxmm
   232  	fpu_xmm4      regxmm
   233  	fpu_xmm5      regxmm
   234  	fpu_xmm6      regxmm
   235  	fpu_xmm7      regxmm
   236  	fpu_xmm8      regxmm
   237  	fpu_xmm9      regxmm
   238  	fpu_xmm10     regxmm
   239  	fpu_xmm11     regxmm
   240  	fpu_xmm12     regxmm
   241  	fpu_xmm13     regxmm
   242  	fpu_xmm14     regxmm
   243  	fpu_xmm15     regxmm
   244  	fpu_rsrv4     [96]int8
   245  	fpu_reserved1 int32
   246  }
   247  
   248  type exceptionstate64 struct {
   249  	trapno     uint16
   250  	cpu        uint16
   251  	err        uint32
   252  	faultvaddr uint64
   253  }
   254  
   255  type mcontext64 struct {
   256  	es        exceptionstate64
   257  	ss        regs64
   258  	fs        floatstate64
   259  	pad_cgo_0 [4]byte
   260  }
   261  
   262  type regs32 struct {
   263  	eax    uint32
   264  	ebx    uint32
   265  	ecx    uint32
   266  	edx    uint32
   267  	edi    uint32
   268  	esi    uint32
   269  	ebp    uint32
   270  	esp    uint32
   271  	ss     uint32
   272  	eflags uint32
   273  	eip    uint32
   274  	cs     uint32
   275  	ds     uint32
   276  	es     uint32
   277  	fs     uint32
   278  	gs     uint32
   279  }
   280  
   281  type floatstate32 struct {
   282  	fpu_reserved  [2]int32
   283  	fpu_fcw       fpcontrol
   284  	fpu_fsw       fpstatus
   285  	fpu_ftw       uint8
   286  	fpu_rsrv1     uint8
   287  	fpu_fop       uint16
   288  	fpu_ip        uint32
   289  	fpu_cs        uint16
   290  	fpu_rsrv2     uint16
   291  	fpu_dp        uint32
   292  	fpu_ds        uint16
   293  	fpu_rsrv3     uint16
   294  	fpu_mxcsr     uint32
   295  	fpu_mxcsrmask uint32
   296  	fpu_stmm0     regmmst
   297  	fpu_stmm1     regmmst
   298  	fpu_stmm2     regmmst
   299  	fpu_stmm3     regmmst
   300  	fpu_stmm4     regmmst
   301  	fpu_stmm5     regmmst
   302  	fpu_stmm6     regmmst
   303  	fpu_stmm7     regmmst
   304  	fpu_xmm0      regxmm
   305  	fpu_xmm1      regxmm
   306  	fpu_xmm2      regxmm
   307  	fpu_xmm3      regxmm
   308  	fpu_xmm4      regxmm
   309  	fpu_xmm5      regxmm
   310  	fpu_xmm6      regxmm
   311  	fpu_xmm7      regxmm
   312  	fpu_rsrv4     [224]int8
   313  	fpu_reserved1 int32
   314  }
   315  
   316  type exceptionstate32 struct {
   317  	trapno     uint16
   318  	cpu        uint16
   319  	err        uint32
   320  	faultvaddr uint32
   321  }
   322  
   323  type mcontext32 struct {
   324  	es exceptionstate32
   325  	ss regs32
   326  	fs floatstate32
   327  }
   328  
   329  type ucontext struct {
   330  	uc_onstack  int32
   331  	uc_sigmask  uint32
   332  	uc_stack    stackt
   333  	uc_link     *ucontext
   334  	uc_mcsize   uint64
   335  	uc_mcontext *mcontext64
   336  }
   337  
   338  type keventt struct {
   339  	ident  uint64
   340  	filter int16
   341  	flags  uint16
   342  	fflags uint32
   343  	data   int64
   344  	udata  *byte
   345  }
   346  
   347  type pthread uintptr
   348  type pthreadattr struct {
   349  	X__sig    int64
   350  	X__opaque [56]int8
   351  }
   352  type pthreadmutex struct {
   353  	X__sig    int64
   354  	X__opaque [56]int8
   355  }
   356  type pthreadmutexattr struct {
   357  	X__sig    int64
   358  	X__opaque [8]int8
   359  }
   360  type pthreadcond struct {
   361  	X__sig    int64
   362  	X__opaque [40]int8
   363  }
   364  type pthreadcondattr struct {
   365  	X__sig    int64
   366  	X__opaque [8]int8
   367  }
   368  
   369  type machTimebaseInfo struct {
   370  	numer uint32
   371  	denom uint32
   372  }
   373  

View as plain text