...
Run Format

Source file src/runtime/defs_darwin_amd64.go

Documentation: runtime

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

View as plain text