...
Run Format

Source file src/runtime/defs_darwin_arm64.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  
    12  	_PROT_NONE  = 0x0
    13  	_PROT_READ  = 0x1
    14  	_PROT_WRITE = 0x2
    15  	_PROT_EXEC  = 0x4
    16  
    17  	_MAP_ANON    = 0x1000
    18  	_MAP_PRIVATE = 0x2
    19  	_MAP_FIXED   = 0x10
    20  
    21  	_MADV_DONTNEED = 0x4
    22  	_MADV_FREE     = 0x5
    23  
    24  	_MACH_MSG_TYPE_MOVE_RECEIVE   = 0x10
    25  	_MACH_MSG_TYPE_MOVE_SEND      = 0x11
    26  	_MACH_MSG_TYPE_MOVE_SEND_ONCE = 0x12
    27  	_MACH_MSG_TYPE_COPY_SEND      = 0x13
    28  	_MACH_MSG_TYPE_MAKE_SEND      = 0x14
    29  	_MACH_MSG_TYPE_MAKE_SEND_ONCE = 0x15
    30  	_MACH_MSG_TYPE_COPY_RECEIVE   = 0x16
    31  
    32  	_MACH_MSG_PORT_DESCRIPTOR         = 0x0
    33  	_MACH_MSG_OOL_DESCRIPTOR          = 0x1
    34  	_MACH_MSG_OOL_PORTS_DESCRIPTOR    = 0x2
    35  	_MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 0x3
    36  
    37  	_MACH_MSGH_BITS_COMPLEX = 0x80000000
    38  
    39  	_MACH_SEND_MSG  = 0x1
    40  	_MACH_RCV_MSG   = 0x2
    41  	_MACH_RCV_LARGE = 0x4
    42  
    43  	_MACH_SEND_TIMEOUT   = 0x10
    44  	_MACH_SEND_INTERRUPT = 0x40
    45  	_MACH_SEND_ALWAYS    = 0x10000
    46  	_MACH_SEND_TRAILER   = 0x20000
    47  	_MACH_RCV_TIMEOUT    = 0x100
    48  	_MACH_RCV_NOTIFY     = 0x200
    49  	_MACH_RCV_INTERRUPT  = 0x400
    50  	_MACH_RCV_OVERWRITE  = 0x1000
    51  
    52  	_NDR_PROTOCOL_2_0      = 0x0
    53  	_NDR_INT_BIG_ENDIAN    = 0x0
    54  	_NDR_INT_LITTLE_ENDIAN = 0x1
    55  	_NDR_FLOAT_IEEE        = 0x0
    56  	_NDR_CHAR_ASCII        = 0x0
    57  
    58  	_SA_SIGINFO   = 0x40
    59  	_SA_RESTART   = 0x2
    60  	_SA_ONSTACK   = 0x1
    61  	_SA_USERTRAMP = 0x100
    62  	_SA_64REGSET  = 0x200
    63  
    64  	_SIGHUP    = 0x1
    65  	_SIGINT    = 0x2
    66  	_SIGQUIT   = 0x3
    67  	_SIGILL    = 0x4
    68  	_SIGTRAP   = 0x5
    69  	_SIGABRT   = 0x6
    70  	_SIGEMT    = 0x7
    71  	_SIGFPE    = 0x8
    72  	_SIGKILL   = 0x9
    73  	_SIGBUS    = 0xa
    74  	_SIGSEGV   = 0xb
    75  	_SIGSYS    = 0xc
    76  	_SIGPIPE   = 0xd
    77  	_SIGALRM   = 0xe
    78  	_SIGTERM   = 0xf
    79  	_SIGURG    = 0x10
    80  	_SIGSTOP   = 0x11
    81  	_SIGTSTP   = 0x12
    82  	_SIGCONT   = 0x13
    83  	_SIGCHLD   = 0x14
    84  	_SIGTTIN   = 0x15
    85  	_SIGTTOU   = 0x16
    86  	_SIGIO     = 0x17
    87  	_SIGXCPU   = 0x18
    88  	_SIGXFSZ   = 0x19
    89  	_SIGVTALRM = 0x1a
    90  	_SIGPROF   = 0x1b
    91  	_SIGWINCH  = 0x1c
    92  	_SIGINFO   = 0x1d
    93  	_SIGUSR1   = 0x1e
    94  	_SIGUSR2   = 0x1f
    95  
    96  	_FPE_INTDIV = 0x7
    97  	_FPE_INTOVF = 0x8
    98  	_FPE_FLTDIV = 0x1
    99  	_FPE_FLTOVF = 0x2
   100  	_FPE_FLTUND = 0x3
   101  	_FPE_FLTRES = 0x4
   102  	_FPE_FLTINV = 0x5
   103  	_FPE_FLTSUB = 0x6
   104  
   105  	_BUS_ADRALN = 0x1
   106  	_BUS_ADRERR = 0x2
   107  	_BUS_OBJERR = 0x3
   108  
   109  	_SEGV_MAPERR = 0x1
   110  	_SEGV_ACCERR = 0x2
   111  
   112  	_ITIMER_REAL    = 0x0
   113  	_ITIMER_VIRTUAL = 0x1
   114  	_ITIMER_PROF    = 0x2
   115  
   116  	_EV_ADD       = 0x1
   117  	_EV_DELETE    = 0x2
   118  	_EV_CLEAR     = 0x20
   119  	_EV_RECEIPT   = 0x40
   120  	_EV_ERROR     = 0x4000
   121  	_EV_EOF       = 0x8000
   122  	_EVFILT_READ  = -0x1
   123  	_EVFILT_WRITE = -0x2
   124  )
   125  
   126  type machbody struct {
   127  	msgh_descriptor_count uint32
   128  }
   129  
   130  type machheader struct {
   131  	msgh_bits        uint32
   132  	msgh_size        uint32
   133  	msgh_remote_port uint32
   134  	msgh_local_port  uint32
   135  	msgh_reserved    uint32
   136  	msgh_id          int32
   137  }
   138  
   139  type machndr struct {
   140  	mig_vers     uint8
   141  	if_vers      uint8
   142  	reserved1    uint8
   143  	mig_encoding uint8
   144  	int_rep      uint8
   145  	char_rep     uint8
   146  	float_rep    uint8
   147  	reserved2    uint8
   148  }
   149  
   150  type machport struct {
   151  	name        uint32
   152  	pad1        uint32
   153  	pad2        uint16
   154  	disposition uint8
   155  	_type       uint8
   156  }
   157  
   158  type stackt struct {
   159  	ss_sp     *byte
   160  	ss_size   uintptr
   161  	ss_flags  int32
   162  	pad_cgo_0 [4]byte
   163  }
   164  
   165  type sigactiont struct {
   166  	__sigaction_u [8]byte
   167  	sa_tramp      unsafe.Pointer
   168  	sa_mask       uint32
   169  	sa_flags      int32
   170  }
   171  
   172  type usigactiont struct {
   173  	__sigaction_u [8]byte
   174  	sa_mask       uint32
   175  	sa_flags      int32
   176  }
   177  
   178  type siginfo struct {
   179  	si_signo  int32
   180  	si_errno  int32
   181  	si_code   int32
   182  	si_pid    int32
   183  	si_uid    uint32
   184  	si_status int32
   185  	si_addr   *byte
   186  	si_value  [8]byte
   187  	si_band   int64
   188  	__pad     [7]uint64
   189  }
   190  
   191  type timeval struct {
   192  	tv_sec    int64
   193  	tv_usec   int32
   194  	pad_cgo_0 [4]byte
   195  }
   196  
   197  func (tv *timeval) set_usec(x int32) {
   198  	tv.tv_usec = x
   199  }
   200  
   201  type itimerval struct {
   202  	it_interval timeval
   203  	it_value    timeval
   204  }
   205  
   206  type timespec struct {
   207  	tv_sec  int64
   208  	tv_nsec int64
   209  }
   210  
   211  type exceptionstate64 struct {
   212  	far uint64 // virtual fault addr
   213  	esr uint32 // exception syndrome
   214  	exc uint32 // number of arm exception taken
   215  }
   216  
   217  type regs64 struct {
   218  	x     [29]uint64 // registers x0 to x28
   219  	fp    uint64     // frame register, x29
   220  	lr    uint64     // link register, x30
   221  	sp    uint64     // stack pointer, x31
   222  	pc    uint64     // program counter
   223  	cpsr  uint32     // current program status register
   224  	__pad uint32
   225  }
   226  
   227  type neonstate64 struct {
   228  	v    [64]uint64 // actually [32]uint128
   229  	fpsr uint32
   230  	fpcr uint32
   231  }
   232  
   233  type mcontext64 struct {
   234  	es exceptionstate64
   235  	ss regs64
   236  	ns neonstate64
   237  }
   238  
   239  type ucontext struct {
   240  	uc_onstack  int32
   241  	uc_sigmask  uint32
   242  	uc_stack    stackt
   243  	uc_link     *ucontext
   244  	uc_mcsize   uint64
   245  	uc_mcontext *mcontext64
   246  }
   247  
   248  type keventt struct {
   249  	ident  uint64
   250  	filter int16
   251  	flags  uint16
   252  	fflags uint32
   253  	data   int64
   254  	udata  *byte
   255  }
   256  

View as plain text