-// godefs -carm-gcc -f -I/usr/local/google/src/linux-2.6.28/arch/arm/include -f -I/usr/local/google/src/linux-2.6.28/include -f-D__KERNEL__ -f-D__ARCH_SI_UID_T=int defs_arm.c
+// godefs -f-I/usr/src/linux-headers-2.6.26-2-versatile/include defs_arm.c
// MACHINE GENERATED - DO NOT EDIT.
BUS_OBJERR = 0x3,
SEGV_MAPERR = 0x1,
SEGV_ACCERR = 0x2,
+ ITIMER_REAL = 0,
+ ITIMER_PROF = 0x2,
+ ITIMER_VIRTUAL = 0x1,
};
// Types
#pragma pack on
-typedef struct Sigset Sigset;
-struct Sigset {
- uint32 sig[2];
-};
-
-typedef struct Sigaction Sigaction;
-struct Sigaction {
- void *sa_handler;
- uint32 sa_flags;
- void *sa_restorer;
- Sigset sa_mask;
-};
+typedef uint32 Sigset;
typedef struct Timespec Timespec;
struct Timespec {
Ucontext *uc_link;
Sigaltstack uc_stack;
Sigcontext uc_mcontext;
- Sigset uc_sigmask;
- int32 __unused[30];
+ uint32 uc_sigmask;
+ int32 __unused[31];
uint32 uc_regspace[128];
};
+typedef struct Timeval Timeval;
+struct Timeval {
+ int32 tv_sec;
+ int32 tv_usec;
+};
+
+typedef struct Itimerval Itimerval;
+struct Itimerval {
+ Timeval it_interval;
+ Timeval it_value;
+};
+
typedef struct Siginfo Siginfo;
struct Siginfo {
int32 si_signo;
int32 si_code;
uint8 _sifields[4];
};
+
+typedef struct Sigaction Sigaction;
+struct Sigaction {
+ void *sa_handler;
+ uint32 sa_flags;
+ void *sa_restorer;
+ uint32 sa_mask;
+};
#pragma pack off
sa.sa_flags |= SA_RESTART;
sa.sa_mask = ~0ULL;
sa.sa_restorer = (void*)runtime·sigreturn;
- sa.k_sa_handler = fn;
+ sa.sa_handler = fn;
runtime·rt_sigaction(i, &sa, nil, 8);
}
void
runtime·resetcpuprofiler(int32 hz)
{
- Sigaction sa;
Itimerval it;
runtime·memclr((byte*)&it, sizeof it);
/*
* Input to godefs
- godefs -carm-gcc -f -I/usr/local/google/src/linux-2.6.28/arch/arm/include -f -I/usr/local/google/src/linux-2.6.28/include -f-D__KERNEL__ -f-D__ARCH_SI_UID_T=int defs_arm.c >arm/defs.h
-
- * Another input file for ARM defs.h
+ * On a Debian Lenny arm linux distribution:
+ godefs -f-I/usr/src/linux-headers-2.6.26-2-versatile/include defs_arm.c
*/
+#define __ARCH_SI_UID_T int
+
#include <asm/signal.h>
#include <asm/mman.h>
#include <asm/sigcontext.h>
#include <asm/ucontext.h>
#include <asm/siginfo.h>
+#include <linux/time.h>
/*
#include <sys/signal.h>
#include <ucontext.h>
*/
-#include <time.h>
-
enum {
$PROT_NONE = PROT_NONE,
$PROT_READ = PROT_READ,
$SEGV_MAPERR = SEGV_MAPERR & 0xFFFF,
$SEGV_ACCERR = SEGV_ACCERR & 0xFFFF,
+
+ $ITIMER_REAL = ITIMER_REAL,
+ $ITIMER_PROF = ITIMER_PROF,
+ $ITIMER_VIRTUAL = ITIMER_VIRTUAL,
};
typedef sigset_t $Sigset;
-typedef struct sigaction $Sigaction;
typedef struct timespec $Timespec;
typedef struct sigaltstack $Sigaltstack;
typedef struct sigcontext $Sigcontext;
typedef struct ucontext $Ucontext;
+typedef struct timeval $Timeval;
+typedef struct itimerval $Itimerval;
struct xsiginfo {
int si_signo;
};
typedef struct xsiginfo $Siginfo;
+
+#undef sa_handler
+#undef sa_flags
+#undef sa_restorer
+#undef sa_mask
+
+struct xsigaction {
+ void (*sa_handler)(void);
+ unsigned long sa_flags;
+ void (*sa_restorer)(void);
+ unsigned int sa_mask; /* mask last for extensibility */
+};
+
+typedef struct xsigaction $Sigaction;