Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/defs_arm_linux.go

Documentation: runtime

     1  // Copyright 2009 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 ignore
     6  // +build ignore
     7  
     8  /*
     9  Input to cgo.
    10  On a Debian Lenny arm linux distribution:
    11  
    12  cgo -cdefs defs_arm.c >arm/defs.h
    13  */
    14  
    15  package runtime
    16  
    17  /*
    18  #cgo CFLAGS: -I/usr/src/linux-headers-2.6.26-2-versatile/include
    19  
    20  #define __ARCH_SI_UID_T int
    21  #include <asm/signal.h>
    22  #include <asm/mman.h>
    23  #include <asm/sigcontext.h>
    24  #include <asm/ucontext.h>
    25  #include <asm/siginfo.h>
    26  #include <linux/time.h>
    27  
    28  struct xsiginfo {
    29  	int si_signo;
    30  	int si_errno;
    31  	int si_code;
    32  	char _sifields[4];
    33  };
    34  
    35  #undef sa_handler
    36  #undef sa_flags
    37  #undef sa_restorer
    38  #undef sa_mask
    39  
    40  struct xsigaction {
    41  	void (*sa_handler)(void);
    42  	unsigned long sa_flags;
    43  	void (*sa_restorer)(void);
    44  	unsigned int sa_mask;		// mask last for extensibility
    45  };
    46  */
    47  import "C"
    48  
    49  const (
    50  	PROT_NONE  = C.PROT_NONE
    51  	PROT_READ  = C.PROT_READ
    52  	PROT_WRITE = C.PROT_WRITE
    53  	PROT_EXEC  = C.PROT_EXEC
    54  
    55  	MAP_ANON    = C.MAP_ANONYMOUS
    56  	MAP_PRIVATE = C.MAP_PRIVATE
    57  	MAP_FIXED   = C.MAP_FIXED
    58  
    59  	MADV_DONTNEED = C.MADV_DONTNEED
    60  
    61  	SA_RESTART  = C.SA_RESTART
    62  	SA_ONSTACK  = C.SA_ONSTACK
    63  	SA_RESTORER = C.SA_RESTORER
    64  	SA_SIGINFO  = C.SA_SIGINFO
    65  
    66  	SIGHUP    = C.SIGHUP
    67  	SIGINT    = C.SIGINT
    68  	SIGQUIT   = C.SIGQUIT
    69  	SIGILL    = C.SIGILL
    70  	SIGTRAP   = C.SIGTRAP
    71  	SIGABRT   = C.SIGABRT
    72  	SIGBUS    = C.SIGBUS
    73  	SIGFPE    = C.SIGFPE
    74  	SIGKILL   = C.SIGKILL
    75  	SIGUSR1   = C.SIGUSR1
    76  	SIGSEGV   = C.SIGSEGV
    77  	SIGUSR2   = C.SIGUSR2
    78  	SIGPIPE   = C.SIGPIPE
    79  	SIGALRM   = C.SIGALRM
    80  	SIGSTKFLT = C.SIGSTKFLT
    81  	SIGCHLD   = C.SIGCHLD
    82  	SIGCONT   = C.SIGCONT
    83  	SIGSTOP   = C.SIGSTOP
    84  	SIGTSTP   = C.SIGTSTP
    85  	SIGTTIN   = C.SIGTTIN
    86  	SIGTTOU   = C.SIGTTOU
    87  	SIGURG    = C.SIGURG
    88  	SIGXCPU   = C.SIGXCPU
    89  	SIGXFSZ   = C.SIGXFSZ
    90  	SIGVTALRM = C.SIGVTALRM
    91  	SIGPROF   = C.SIGPROF
    92  	SIGWINCH  = C.SIGWINCH
    93  	SIGIO     = C.SIGIO
    94  	SIGPWR    = C.SIGPWR
    95  	SIGSYS    = C.SIGSYS
    96  
    97  	FPE_INTDIV = C.FPE_INTDIV & 0xFFFF
    98  	FPE_INTOVF = C.FPE_INTOVF & 0xFFFF
    99  	FPE_FLTDIV = C.FPE_FLTDIV & 0xFFFF
   100  	FPE_FLTOVF = C.FPE_FLTOVF & 0xFFFF
   101  	FPE_FLTUND = C.FPE_FLTUND & 0xFFFF
   102  	FPE_FLTRES = C.FPE_FLTRES & 0xFFFF
   103  	FPE_FLTINV = C.FPE_FLTINV & 0xFFFF
   104  	FPE_FLTSUB = C.FPE_FLTSUB & 0xFFFF
   105  
   106  	BUS_ADRALN = C.BUS_ADRALN & 0xFFFF
   107  	BUS_ADRERR = C.BUS_ADRERR & 0xFFFF
   108  	BUS_OBJERR = C.BUS_OBJERR & 0xFFFF
   109  
   110  	SEGV_MAPERR = C.SEGV_MAPERR & 0xFFFF
   111  	SEGV_ACCERR = C.SEGV_ACCERR & 0xFFFF
   112  
   113  	ITIMER_REAL    = C.ITIMER_REAL
   114  	ITIMER_PROF    = C.ITIMER_PROF
   115  	ITIMER_VIRTUAL = C.ITIMER_VIRTUAL
   116  )
   117  
   118  type Timespec C.struct_timespec
   119  type StackT C.stack_t
   120  type Sigcontext C.struct_sigcontext
   121  type Ucontext C.struct_ucontext
   122  type Timeval C.struct_timeval
   123  type Itimerval C.struct_itimerval
   124  type Siginfo C.struct_xsiginfo
   125  type Sigaction C.struct_xsigaction
   126  

View as plain text