Source file src/runtime/defs1_solaris_amd64.go

     1  // created by cgo -cdefs and then converted to Go
     2  // cgo -cdefs defs_solaris.go defs_solaris_amd64.go
     3  
     4  package runtime
     5  
     6  const (
     7  	_EINTR       = 0x4
     8  	_EBADF       = 0x9
     9  	_EFAULT      = 0xe
    10  	_EAGAIN      = 0xb
    11  	_EBUSY       = 0x10
    12  	_ETIME       = 0x3e
    13  	_ETIMEDOUT   = 0x91
    14  	_EWOULDBLOCK = 0xb
    15  	_EINPROGRESS = 0x96
    16  
    17  	_PROT_NONE  = 0x0
    18  	_PROT_READ  = 0x1
    19  	_PROT_WRITE = 0x2
    20  	_PROT_EXEC  = 0x4
    21  
    22  	_MAP_ANON    = 0x100
    23  	_MAP_PRIVATE = 0x2
    24  	_MAP_FIXED   = 0x10
    25  
    26  	_MADV_DONTNEED = 0x4
    27  	_MADV_FREE     = 0x5
    28  
    29  	_SA_SIGINFO = 0x8
    30  	_SA_RESTART = 0x4
    31  	_SA_ONSTACK = 0x1
    32  
    33  	_SIGHUP    = 0x1
    34  	_SIGINT    = 0x2
    35  	_SIGQUIT   = 0x3
    36  	_SIGILL    = 0x4
    37  	_SIGTRAP   = 0x5
    38  	_SIGABRT   = 0x6
    39  	_SIGEMT    = 0x7
    40  	_SIGFPE    = 0x8
    41  	_SIGKILL   = 0x9
    42  	_SIGBUS    = 0xa
    43  	_SIGSEGV   = 0xb
    44  	_SIGSYS    = 0xc
    45  	_SIGPIPE   = 0xd
    46  	_SIGALRM   = 0xe
    47  	_SIGTERM   = 0xf
    48  	_SIGURG    = 0x15
    49  	_SIGSTOP   = 0x17
    50  	_SIGTSTP   = 0x18
    51  	_SIGCONT   = 0x19
    52  	_SIGCHLD   = 0x12
    53  	_SIGTTIN   = 0x1a
    54  	_SIGTTOU   = 0x1b
    55  	_SIGIO     = 0x16
    56  	_SIGXCPU   = 0x1e
    57  	_SIGXFSZ   = 0x1f
    58  	_SIGVTALRM = 0x1c
    59  	_SIGPROF   = 0x1d
    60  	_SIGWINCH  = 0x14
    61  	_SIGUSR1   = 0x10
    62  	_SIGUSR2   = 0x11
    63  
    64  	_FPE_INTDIV = 0x1
    65  	_FPE_INTOVF = 0x2
    66  	_FPE_FLTDIV = 0x3
    67  	_FPE_FLTOVF = 0x4
    68  	_FPE_FLTUND = 0x5
    69  	_FPE_FLTRES = 0x6
    70  	_FPE_FLTINV = 0x7
    71  	_FPE_FLTSUB = 0x8
    72  
    73  	_BUS_ADRALN = 0x1
    74  	_BUS_ADRERR = 0x2
    75  	_BUS_OBJERR = 0x3
    76  
    77  	_SEGV_MAPERR = 0x1
    78  	_SEGV_ACCERR = 0x2
    79  
    80  	_ITIMER_REAL    = 0x0
    81  	_ITIMER_VIRTUAL = 0x1
    82  	_ITIMER_PROF    = 0x2
    83  
    84  	__SC_PAGESIZE         = 0xb
    85  	__SC_NPROCESSORS_ONLN = 0xf
    86  
    87  	_PTHREAD_CREATE_DETACHED = 0x40
    88  
    89  	_FORK_NOSIGCHLD = 0x1
    90  	_FORK_WAITPID   = 0x2
    91  
    92  	_MAXHOSTNAMELEN = 0x100
    93  
    94  	_O_WRONLY   = 0x1
    95  	_O_NONBLOCK = 0x80
    96  	_O_TRUNC    = 0x200
    97  	_O_CREAT    = 0x100
    98  	_O_CLOEXEC  = 0x800000
    99  	_FD_CLOEXEC = 0x1
   100  	_F_GETFL    = 0x3
   101  	_F_SETFL    = 0x4
   102  	_F_SETFD    = 0x2
   103  
   104  	_POLLIN  = 0x1
   105  	_POLLOUT = 0x4
   106  	_POLLHUP = 0x10
   107  	_POLLERR = 0x8
   108  
   109  	_PORT_SOURCE_FD    = 0x4
   110  	_PORT_SOURCE_ALERT = 0x5
   111  	_PORT_ALERT_UPDATE = 0x2
   112  )
   113  
   114  type semt struct {
   115  	sem_count uint32
   116  	sem_type  uint16
   117  	sem_magic uint16
   118  	sem_pad1  [3]uint64
   119  	sem_pad2  [2]uint64
   120  }
   121  
   122  type sigset struct {
   123  	__sigbits [4]uint32
   124  }
   125  
   126  type stackt struct {
   127  	ss_sp     *byte
   128  	ss_size   uintptr
   129  	ss_flags  int32
   130  	pad_cgo_0 [4]byte
   131  }
   132  
   133  type siginfo struct {
   134  	si_signo int32
   135  	si_code  int32
   136  	si_errno int32
   137  	si_pad   int32
   138  	__data   [240]byte
   139  }
   140  
   141  type sigactiont struct {
   142  	sa_flags  int32
   143  	pad_cgo_0 [4]byte
   144  	_funcptr  [8]byte
   145  	sa_mask   sigset
   146  }
   147  
   148  type fpregset struct {
   149  	fp_reg_set [528]byte
   150  }
   151  
   152  type mcontext struct {
   153  	gregs  [28]int64
   154  	fpregs fpregset
   155  }
   156  
   157  type ucontext struct {
   158  	uc_flags    uint64
   159  	uc_link     *ucontext
   160  	uc_sigmask  sigset
   161  	uc_stack    stackt
   162  	pad_cgo_0   [8]byte
   163  	uc_mcontext mcontext
   164  	uc_filler   [5]int64
   165  	pad_cgo_1   [8]byte
   166  }
   167  
   168  type timespec struct {
   169  	tv_sec  int64
   170  	tv_nsec int64
   171  }
   172  
   173  //go:nosplit
   174  func (ts *timespec) setNsec(ns int64) {
   175  	ts.tv_sec = ns / 1e9
   176  	ts.tv_nsec = ns % 1e9
   177  }
   178  
   179  type timeval struct {
   180  	tv_sec  int64
   181  	tv_usec int64
   182  }
   183  
   184  func (tv *timeval) set_usec(x int32) {
   185  	tv.tv_usec = int64(x)
   186  }
   187  
   188  type itimerval struct {
   189  	it_interval timeval
   190  	it_value    timeval
   191  }
   192  
   193  type portevent struct {
   194  	portev_events int32
   195  	portev_source uint16
   196  	portev_pad    uint16
   197  	portev_object uint64
   198  	portev_user   *byte
   199  }
   200  
   201  type pthread uint32
   202  type pthreadattr struct {
   203  	__pthread_attrp *byte
   204  }
   205  
   206  type stat struct {
   207  	st_dev     uint64
   208  	st_ino     uint64
   209  	st_mode    uint32
   210  	st_nlink   uint32
   211  	st_uid     uint32
   212  	st_gid     uint32
   213  	st_rdev    uint64
   214  	st_size    int64
   215  	st_atim    timespec
   216  	st_mtim    timespec
   217  	st_ctim    timespec
   218  	st_blksize int32
   219  	pad_cgo_0  [4]byte
   220  	st_blocks  int64
   221  	st_fstype  [16]int8
   222  }
   223  
   224  // created by cgo -cdefs and then converted to Go
   225  // cgo -cdefs defs_solaris.go defs_solaris_amd64.go
   226  
   227  const (
   228  	_REG_RDI    = 0x8
   229  	_REG_RSI    = 0x9
   230  	_REG_RDX    = 0xc
   231  	_REG_RCX    = 0xd
   232  	_REG_R8     = 0x7
   233  	_REG_R9     = 0x6
   234  	_REG_R10    = 0x5
   235  	_REG_R11    = 0x4
   236  	_REG_R12    = 0x3
   237  	_REG_R13    = 0x2
   238  	_REG_R14    = 0x1
   239  	_REG_R15    = 0x0
   240  	_REG_RBP    = 0xa
   241  	_REG_RBX    = 0xb
   242  	_REG_RAX    = 0xe
   243  	_REG_GS     = 0x17
   244  	_REG_FS     = 0x16
   245  	_REG_ES     = 0x18
   246  	_REG_DS     = 0x19
   247  	_REG_TRAPNO = 0xf
   248  	_REG_ERR    = 0x10
   249  	_REG_RIP    = 0x11
   250  	_REG_CS     = 0x12
   251  	_REG_RFLAGS = 0x13
   252  	_REG_RSP    = 0x14
   253  	_REG_SS     = 0x15
   254  )
   255  

View as plain text