X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fsiginfo.h;h=8ddd3c99bcf786def122495b35fbc1d65f218b31;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=fec216976f9e149906e81a503984bd8b67cedf78;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index fec216976..8ddd3c99b 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h @@ -13,7 +13,7 @@ #define SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int)) #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE-SIGEV_HEAD_SIZE) / sizeof(int)) -#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 4) +#undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */ #define HAVE_ARCH_SIGINFO_T @@ -24,15 +24,23 @@ #define HAVE_ARCH_COPY_SIGINFO struct siginfo; -#include +/* + * Careful to keep union _sifields from shifting ... + */ +#ifdef CONFIG_MIPS32 +#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) +#endif +#ifdef CONFIG_MIPS64 +#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) +#endif -/* This structure matches the 32/n32 ABIs for source compatibility but - has Linux extensions. */ +#include typedef struct siginfo { int si_signo; int si_code; int si_errno; + int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3]; union { int _pad[SI_PAD_SIZE]; @@ -40,131 +48,57 @@ typedef struct siginfo { /* kill() */ struct { pid_t _pid; /* sender's pid */ - uid_t _uid; /* sender's uid */ + __ARCH_SI_UID_T _uid; /* sender's uid */ } _kill; - /* SIGCHLD */ - struct { - pid_t _pid; /* which child */ - uid_t _uid; /* sender's uid */ - int _status; /* exit code */ - clock_t _utime; - clock_t _stime; - } _sigchld; - - /* IRIX SIGCHLD */ - struct { - pid_t _pid; /* which child */ - clock_t _utime; - int _status; /* exit code */ - clock_t _stime; - } _irix_sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ - struct { - void *_addr; /* faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL, SIGXFSZ (To do ...) */ - struct { -#ifdef CONFIG_MIPS32 - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ -#endif -#ifdef CONFIG_MIPS64 - long _band; /* POLL_IN, POLL_OUT, POLL_MSG */ -#endif - int _fd; - } _sigpoll; - /* POSIX.1b timers */ struct { timer_t _tid; /* timer id */ int _overrun; /* overrun count */ char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; sigval_t _sigval; /* same as below */ - int _sys_private; /* not to be passed to user */ + int _sys_private; /* not to be passed to user */ } _timer; /* POSIX.1b signals */ struct { pid_t _pid; /* sender's pid */ - uid_t _uid; /* sender's uid */ + __ARCH_SI_UID_T _uid; /* sender's uid */ sigval_t _sigval; } _rt; - } _sifields; -} siginfo_t; - -#if defined(__KERNEL__) && defined(CONFIG_COMPAT) - -#include - -#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) - -typedef union sigval32 { - int sival_int; - s32 sival_ptr; -} sigval_t32; - -typedef struct siginfo32 { - int si_signo; - int si_code; - int si_errno; - - union { - int _pad[SI_PAD_SIZE32]; - - /* kill() */ - struct { - compat_pid_t _pid; /* sender's pid */ - compat_uid_t _uid; /* sender's uid */ - } _kill; - /* SIGCHLD */ struct { - compat_pid_t _pid; /* which child */ - compat_uid_t _uid; /* sender's uid */ - compat_clock_t _utime; + pid_t _pid; /* which child */ + __ARCH_SI_UID_T _uid; /* sender's uid */ int _status; /* exit code */ - compat_clock_t _stime; + clock_t _utime; + clock_t _stime; } _sigchld; /* IRIX SIGCHLD */ struct { - compat_pid_t _pid; /* which child */ - compat_clock_t _utime; + pid_t _pid; /* which child */ + clock_t _utime; int _status; /* exit code */ - compat_clock_t _stime; + clock_t _stime; } _irix_sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ struct { - s32 _addr; /* faulting insn/memory ref. */ + void __user *_addr; /* faulting insn/memory ref. */ +#ifdef __ARCH_SI_TRAPNO + int _trapno; /* TRAP # which caused the signal */ +#endif } _sigfault; /* SIGPOLL, SIGXFSZ (To do ...) */ struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ int _fd; } _sigpoll; - - /* POSIX.1b timers */ - struct { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals */ - struct { - compat_pid_t _pid; /* sender's pid */ - compat_uid_t _uid; /* sender's uid */ - sigval_t32 _sigval; - } _rt; - } _sifields; -} siginfo_t32; - -#endif /* defined(__KERNEL__) && defined(CONFIG_COMPAT) */ +} siginfo_t; /* * si_code values