diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-05-01 08:59:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 08:59:08 -0700 |
commit | a71c1ab50a2a0f4dd9834bf5a917a2f064535c6b (patch) | |
tree | 063bdb02b335f2c5b38f9e503434fa5fbf0106c4 /include/asm-generic/siginfo.h | |
parent | 696f9486d0207d499391004f5bc9bd7c0e6ae82f (diff) | |
download | linux-a71c1ab50a2a0f4dd9834bf5a917a2f064535c6b.tar.gz linux-a71c1ab50a2a0f4dd9834bf5a917a2f064535c6b.tar.bz2 linux-a71c1ab50a2a0f4dd9834bf5a917a2f064535c6b.zip |
[PATCH] consolidate SIGEV_PAD_SIZE
Discussing with Matthew Wilcox some of his outstanding patches lead me to
this patch (among others).
The preamble in struct sigevent can be expressed independently of the
architecture.
Also use __ARCH_SI_PREAMBLE_SIZE on ia64.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-generic/siginfo.h')
-rw-r--r-- | include/asm-generic/siginfo.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 9cac8e8dde51..8786e01e0db8 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h @@ -236,11 +236,18 @@ typedef struct siginfo { #define SIGEV_THREAD 2 /* deliver via thread creation */ #define SIGEV_THREAD_ID 4 /* deliver to thread */ -#define SIGEV_MAX_SIZE 64 -#ifndef SIGEV_PAD_SIZE -#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) +/* + * This works because the alignment is ok on all current architectures + * but we leave open this being overridden in the future + */ +#ifndef __ARCH_SIGEV_PREAMBLE_SIZE +#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) #endif +#define SIGEV_MAX_SIZE 64 +#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ + / sizeof(int)) + typedef struct sigevent { sigval_t sigev_value; int sigev_signo; |