github.com/aloncn/graphics-go@v0.0.1/src/runtime/defs_arm_linux.go (about)

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