github.com/megatontech/mynoteforgo@v0.0.0-20200507084910-5d0c6ea6e890/源码/runtime/defs_aix_ppc64.go (about)

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