Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/defs_aix_ppc64.go

Documentation: runtime

     1  // Copyright 2018 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  //go:build aix
     6  // +build aix
     7  
     8  package runtime
     9  
    10  const (
    11  	_EPERM     = 0x1
    12  	_ENOENT    = 0x2
    13  	_EINTR     = 0x4
    14  	_EAGAIN    = 0xb
    15  	_ENOMEM    = 0xc
    16  	_EACCES    = 0xd
    17  	_EFAULT    = 0xe
    18  	_EINVAL    = 0x16
    19  	_ETIMEDOUT = 0x4e
    20  
    21  	_PROT_NONE  = 0x0
    22  	_PROT_READ  = 0x1
    23  	_PROT_WRITE = 0x2
    24  	_PROT_EXEC  = 0x4
    25  
    26  	_MAP_ANON      = 0x10
    27  	_MAP_PRIVATE   = 0x2
    28  	_MAP_FIXED     = 0x100
    29  	_MADV_DONTNEED = 0x4
    30  
    31  	_SIGHUP     = 0x1
    32  	_SIGINT     = 0x2
    33  	_SIGQUIT    = 0x3
    34  	_SIGILL     = 0x4
    35  	_SIGTRAP    = 0x5
    36  	_SIGABRT    = 0x6
    37  	_SIGBUS     = 0xa
    38  	_SIGFPE     = 0x8
    39  	_SIGKILL    = 0x9
    40  	_SIGUSR1    = 0x1e
    41  	_SIGSEGV    = 0xb
    42  	_SIGUSR2    = 0x1f
    43  	_SIGPIPE    = 0xd
    44  	_SIGALRM    = 0xe
    45  	_SIGCHLD    = 0x14
    46  	_SIGCONT    = 0x13
    47  	_SIGSTOP    = 0x11
    48  	_SIGTSTP    = 0x12
    49  	_SIGTTIN    = 0x15
    50  	_SIGTTOU    = 0x16
    51  	_SIGURG     = 0x10
    52  	_SIGXCPU    = 0x18
    53  	_SIGXFSZ    = 0x19
    54  	_SIGVTALRM  = 0x22
    55  	_SIGPROF    = 0x20
    56  	_SIGWINCH   = 0x1c
    57  	_SIGIO      = 0x17
    58  	_SIGPWR     = 0x1d
    59  	_SIGSYS     = 0xc
    60  	_SIGTERM    = 0xf
    61  	_SIGEMT     = 0x7
    62  	_SIGWAITING = 0x27
    63  
    64  	_FPE_INTDIV = 0x14
    65  	_FPE_INTOVF = 0x15
    66  	_FPE_FLTDIV = 0x16
    67  	_FPE_FLTOVF = 0x17
    68  	_FPE_FLTUND = 0x18
    69  	_FPE_FLTRES = 0x19
    70  	_FPE_FLTINV = 0x1a
    71  	_FPE_FLTSUB = 0x1b
    72  
    73  	_BUS_ADRALN = 0x1
    74  	_BUS_ADRERR = 0x2
    75  	_BUS_OBJERR = 0x3
    76  	_
    77  	_SEGV_MAPERR = 0x32
    78  	_SEGV_ACCERR = 0x33
    79  
    80  	_ITIMER_REAL    = 0x0
    81  	_ITIMER_VIRTUAL = 0x1
    82  	_ITIMER_PROF    = 0x2
    83  
    84  	_O_RDONLY   = 0x0
    85  	_O_NONBLOCK = 0x4
    86  
    87  	_SS_DISABLE  = 0x2
    88  	_SI_USER     = 0x0
    89  	_SIG_BLOCK   = 0x0
    90  	_SIG_UNBLOCK = 0x1
    91  	_SIG_SETMASK = 0x2
    92  
    93  	_SA_SIGINFO = 0x100
    94  	_SA_RESTART = 0x8
    95  	_SA_ONSTACK = 0x1
    96  
    97  	_PTHREAD_CREATE_DETACHED = 0x1
    98  
    99  	__SC_PAGE_SIZE        = 0x30
   100  	__SC_NPROCESSORS_ONLN = 0x48
   101  
   102  	_F_SETFD    = 0x2
   103  	_F_SETFL    = 0x4
   104  	_F_GETFD    = 0x1
   105  	_F_GETFL    = 0x3
   106  	_FD_CLOEXEC = 0x1
   107  )
   108  
   109  type sigset [4]uint64
   110  
   111  var sigset_all = sigset{^uint64(0), ^uint64(0), ^uint64(0), ^uint64(0)}
   112  
   113  type siginfo struct {
   114  	si_signo   int32
   115  	si_errno   int32
   116  	si_code    int32
   117  	si_pid     int32
   118  	si_uid     uint32
   119  	si_status  int32
   120  	si_addr    uintptr
   121  	si_band    int64
   122  	si_value   [2]int32 // [8]byte
   123  	__si_flags int32
   124  	__pad      [3]int32
   125  }
   126  
   127  type timespec struct {
   128  	tv_sec  int64
   129  	tv_nsec int64
   130  }
   131  
   132  //go:nosplit
   133  func (ts *timespec) setNsec(ns int64) {
   134  	ts.tv_sec = ns / 1e9
   135  	ts.tv_nsec = ns % 1e9
   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 stackt struct {
   154  	ss_sp     uintptr
   155  	ss_size   uintptr
   156  	ss_flags  int32
   157  	__pad     [4]int32
   158  	pas_cgo_0 [4]byte
   159  }
   160  
   161  type sigcontext struct {
   162  	sc_onstack int32
   163  	pad_cgo_0  [4]byte
   164  	sc_mask    sigset
   165  	sc_uerror  int32
   166  	sc_jmpbuf  context64
   167  }
   168  
   169  type ucontext struct {
   170  	__sc_onstack   int32
   171  	pad_cgo_0      [4]byte
   172  	uc_sigmask     sigset
   173  	__sc_error     int32
   174  	pad_cgo_1      [4]byte
   175  	uc_mcontext    context64
   176  	uc_link        *ucontext
   177  	uc_stack       stackt
   178  	__extctx       uintptr // pointer to struct __extctx but we don't use it
   179  	__extctx_magic int32
   180  	__pad          int32
   181  }
   182  
   183  type context64 struct {
   184  	gpr        [32]uint64
   185  	msr        uint64
   186  	iar        uint64
   187  	lr         uint64
   188  	ctr        uint64
   189  	cr         uint32
   190  	xer        uint32
   191  	fpscr      uint32
   192  	fpscrx     uint32
   193  	except     [1]uint64
   194  	fpr        [32]float64
   195  	fpeu       uint8
   196  	fpinfo     uint8
   197  	fpscr24_31 uint8
   198  	pad        [1]uint8
   199  	excp_type  int32
   200  }
   201  
   202  type sigactiont struct {
   203  	sa_handler uintptr // a union of two pointer
   204  	sa_mask    sigset
   205  	sa_flags   int32
   206  	pad_cgo_0  [4]byte
   207  }
   208  
   209  type pthread uint32
   210  type pthread_attr *byte
   211  
   212  type semt int32
   213  

View as plain text