github.com/geraldss/go/src@v0.0.0-20210511222824-ac7d0ebfc235/runtime/defs_openbsd_arm64.go (about)

     1  // Copyright 2019 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  package runtime
     6  
     7  import "unsafe"
     8  
     9  const (
    10  	_EINTR  = 0x4
    11  	_EFAULT = 0xe
    12  	_EAGAIN = 0x23
    13  	_ENOSYS = 0x4e
    14  
    15  	_O_NONBLOCK = 0x4
    16  	_O_CLOEXEC  = 0x10000
    17  
    18  	_PROT_NONE  = 0x0
    19  	_PROT_READ  = 0x1
    20  	_PROT_WRITE = 0x2
    21  	_PROT_EXEC  = 0x4
    22  
    23  	_MAP_ANON    = 0x1000
    24  	_MAP_PRIVATE = 0x2
    25  	_MAP_FIXED   = 0x10
    26  	_MAP_STACK   = 0x4000
    27  
    28  	_MADV_FREE = 0x6
    29  
    30  	_SA_SIGINFO = 0x40
    31  	_SA_RESTART = 0x2
    32  	_SA_ONSTACK = 0x1
    33  
    34  	_PTHREAD_CREATE_DETACHED = 0x1
    35  
    36  	_SIGHUP    = 0x1
    37  	_SIGINT    = 0x2
    38  	_SIGQUIT   = 0x3
    39  	_SIGILL    = 0x4
    40  	_SIGTRAP   = 0x5
    41  	_SIGABRT   = 0x6
    42  	_SIGEMT    = 0x7
    43  	_SIGFPE    = 0x8
    44  	_SIGKILL   = 0x9
    45  	_SIGBUS    = 0xa
    46  	_SIGSEGV   = 0xb
    47  	_SIGSYS    = 0xc
    48  	_SIGPIPE   = 0xd
    49  	_SIGALRM   = 0xe
    50  	_SIGTERM   = 0xf
    51  	_SIGURG    = 0x10
    52  	_SIGSTOP   = 0x11
    53  	_SIGTSTP   = 0x12
    54  	_SIGCONT   = 0x13
    55  	_SIGCHLD   = 0x14
    56  	_SIGTTIN   = 0x15
    57  	_SIGTTOU   = 0x16
    58  	_SIGIO     = 0x17
    59  	_SIGXCPU   = 0x18
    60  	_SIGXFSZ   = 0x19
    61  	_SIGVTALRM = 0x1a
    62  	_SIGPROF   = 0x1b
    63  	_SIGWINCH  = 0x1c
    64  	_SIGINFO   = 0x1d
    65  	_SIGUSR1   = 0x1e
    66  	_SIGUSR2   = 0x1f
    67  
    68  	_FPE_INTDIV = 0x1
    69  	_FPE_INTOVF = 0x2
    70  	_FPE_FLTDIV = 0x3
    71  	_FPE_FLTOVF = 0x4
    72  	_FPE_FLTUND = 0x5
    73  	_FPE_FLTRES = 0x6
    74  	_FPE_FLTINV = 0x7
    75  	_FPE_FLTSUB = 0x8
    76  
    77  	_BUS_ADRALN = 0x1
    78  	_BUS_ADRERR = 0x2
    79  	_BUS_OBJERR = 0x3
    80  
    81  	_SEGV_MAPERR = 0x1
    82  	_SEGV_ACCERR = 0x2
    83  
    84  	_ITIMER_REAL    = 0x0
    85  	_ITIMER_VIRTUAL = 0x1
    86  	_ITIMER_PROF    = 0x2
    87  
    88  	_EV_ADD       = 0x1
    89  	_EV_DELETE    = 0x2
    90  	_EV_CLEAR     = 0x20
    91  	_EV_ERROR     = 0x4000
    92  	_EV_EOF       = 0x8000
    93  	_EVFILT_READ  = -0x1
    94  	_EVFILT_WRITE = -0x2
    95  )
    96  
    97  type tforkt struct {
    98  	tf_tcb   unsafe.Pointer
    99  	tf_tid   *int32
   100  	tf_stack uintptr
   101  }
   102  
   103  type sigcontext struct {
   104  	__sc_unused int32
   105  	sc_mask     int32
   106  	sc_sp       uintptr
   107  	sc_lr       uintptr
   108  	sc_elr      uintptr
   109  	sc_spsr     uintptr
   110  	sc_x        [30]uintptr
   111  	sc_cookie   int64
   112  }
   113  
   114  type siginfo struct {
   115  	si_signo  int32
   116  	si_code   int32
   117  	si_errno  int32
   118  	pad_cgo_0 [4]byte
   119  	_data     [120]byte
   120  }
   121  
   122  type stackt struct {
   123  	ss_sp     uintptr
   124  	ss_size   uintptr
   125  	ss_flags  int32
   126  	pad_cgo_0 [4]byte
   127  }
   128  
   129  type timespec struct {
   130  	tv_sec  int64
   131  	tv_nsec int64
   132  }
   133  
   134  //go:nosplit
   135  func (ts *timespec) setNsec(ns int64) {
   136  	ts.tv_sec = ns / 1e9
   137  	ts.tv_nsec = ns % 1e9
   138  }
   139  
   140  type timeval struct {
   141  	tv_sec  int64
   142  	tv_usec int64
   143  }
   144  
   145  func (tv *timeval) set_usec(x int32) {
   146  	tv.tv_usec = int64(x)
   147  }
   148  
   149  type itimerval struct {
   150  	it_interval timeval
   151  	it_value    timeval
   152  }
   153  
   154  type keventt struct {
   155  	ident  uint64
   156  	filter int16
   157  	flags  uint16
   158  	fflags uint32
   159  	data   int64
   160  	udata  *byte
   161  }
   162  
   163  type pthread uintptr
   164  type pthreadattr uintptr
   165  type pthreadcond uintptr
   166  type pthreadcondattr uintptr
   167  type pthreadmutex uintptr
   168  type pthreadmutexattr uintptr