github.com/reiver/go@v0.0.0-20150109200633-1d0c7792f172/src/runtime/defs_linux_arm.go (about)

     1  package runtime
     2  
     3  // Constants
     4  const (
     5  	_EINTR  = 0x4
     6  	_ENOMEM = 0xc
     7  	_EAGAIN = 0xb
     8  
     9  	_PROT_NONE      = 0
    10  	_PROT_READ      = 0x1
    11  	_PROT_WRITE     = 0x2
    12  	_PROT_EXEC      = 0x4
    13  	_MAP_ANON       = 0x20
    14  	_MAP_PRIVATE    = 0x2
    15  	_MAP_FIXED      = 0x10
    16  	_MADV_DONTNEED  = 0x4
    17  	_SA_RESTART     = 0x10000000
    18  	_SA_ONSTACK     = 0x8000000
    19  	_SA_RESTORER    = 0 // unused on ARM
    20  	_SA_SIGINFO     = 0x4
    21  	_SIGHUP         = 0x1
    22  	_SIGINT         = 0x2
    23  	_SIGQUIT        = 0x3
    24  	_SIGILL         = 0x4
    25  	_SIGTRAP        = 0x5
    26  	_SIGABRT        = 0x6
    27  	_SIGBUS         = 0x7
    28  	_SIGFPE         = 0x8
    29  	_SIGKILL        = 0x9
    30  	_SIGUSR1        = 0xa
    31  	_SIGSEGV        = 0xb
    32  	_SIGUSR2        = 0xc
    33  	_SIGPIPE        = 0xd
    34  	_SIGALRM        = 0xe
    35  	_SIGSTKFLT      = 0x10
    36  	_SIGCHLD        = 0x11
    37  	_SIGCONT        = 0x12
    38  	_SIGSTOP        = 0x13
    39  	_SIGTSTP        = 0x14
    40  	_SIGTTIN        = 0x15
    41  	_SIGTTOU        = 0x16
    42  	_SIGURG         = 0x17
    43  	_SIGXCPU        = 0x18
    44  	_SIGXFSZ        = 0x19
    45  	_SIGVTALRM      = 0x1a
    46  	_SIGPROF        = 0x1b
    47  	_SIGWINCH       = 0x1c
    48  	_SIGIO          = 0x1d
    49  	_SIGPWR         = 0x1e
    50  	_SIGSYS         = 0x1f
    51  	_FPE_INTDIV     = 0x1
    52  	_FPE_INTOVF     = 0x2
    53  	_FPE_FLTDIV     = 0x3
    54  	_FPE_FLTOVF     = 0x4
    55  	_FPE_FLTUND     = 0x5
    56  	_FPE_FLTRES     = 0x6
    57  	_FPE_FLTINV     = 0x7
    58  	_FPE_FLTSUB     = 0x8
    59  	_BUS_ADRALN     = 0x1
    60  	_BUS_ADRERR     = 0x2
    61  	_BUS_OBJERR     = 0x3
    62  	_SEGV_MAPERR    = 0x1
    63  	_SEGV_ACCERR    = 0x2
    64  	_ITIMER_REAL    = 0
    65  	_ITIMER_PROF    = 0x2
    66  	_ITIMER_VIRTUAL = 0x1
    67  	_O_RDONLY       = 0
    68  	_O_CLOEXEC      = 02000000
    69  
    70  	_EPOLLIN       = 0x1
    71  	_EPOLLOUT      = 0x4
    72  	_EPOLLERR      = 0x8
    73  	_EPOLLHUP      = 0x10
    74  	_EPOLLRDHUP    = 0x2000
    75  	_EPOLLET       = 0x80000000
    76  	_EPOLL_CLOEXEC = 0x80000
    77  	_EPOLL_CTL_ADD = 0x1
    78  	_EPOLL_CTL_DEL = 0x2
    79  	_EPOLL_CTL_MOD = 0x3
    80  )
    81  
    82  type timespec struct {
    83  	tv_sec  int32
    84  	tv_nsec int32
    85  }
    86  
    87  func (ts *timespec) set_sec(x int64) {
    88  	ts.tv_sec = int32(x)
    89  }
    90  
    91  func (ts *timespec) set_nsec(x int32) {
    92  	ts.tv_nsec = x
    93  }
    94  
    95  type sigaltstackt struct {
    96  	ss_sp    *byte
    97  	ss_flags int32
    98  	ss_size  uintptr
    99  }
   100  
   101  type sigcontext struct {
   102  	trap_no       uint32
   103  	error_code    uint32
   104  	oldmask       uint32
   105  	r0            uint32
   106  	r1            uint32
   107  	r2            uint32
   108  	r3            uint32
   109  	r4            uint32
   110  	r5            uint32
   111  	r6            uint32
   112  	r7            uint32
   113  	r8            uint32
   114  	r9            uint32
   115  	r10           uint32
   116  	fp            uint32
   117  	ip            uint32
   118  	sp            uint32
   119  	lr            uint32
   120  	pc            uint32
   121  	cpsr          uint32
   122  	fault_address uint32
   123  }
   124  
   125  type ucontext struct {
   126  	uc_flags    uint32
   127  	uc_link     *ucontext
   128  	uc_stack    sigaltstackt
   129  	uc_mcontext sigcontext
   130  	uc_sigmask  uint32
   131  	__unused    [31]int32
   132  	uc_regspace [128]uint32
   133  }
   134  
   135  type timeval struct {
   136  	tv_sec  int32
   137  	tv_usec int32
   138  }
   139  
   140  func (tv *timeval) set_usec(x int32) {
   141  	tv.tv_usec = x
   142  }
   143  
   144  type itimerval struct {
   145  	it_interval timeval
   146  	it_value    timeval
   147  }
   148  
   149  type siginfo struct {
   150  	si_signo int32
   151  	si_errno int32
   152  	si_code  int32
   153  	// below here is a union; si_addr is the only field we use
   154  	si_addr uint32
   155  }
   156  
   157  type sigactiont struct {
   158  	sa_handler  uintptr
   159  	sa_flags    uint32
   160  	sa_restorer uintptr
   161  	sa_mask     uint64
   162  }
   163  
   164  type epollevent struct {
   165  	events uint32
   166  	_pad   uint32
   167  	data   [8]byte // to match amd64
   168  }