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