summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-03-09 16:40:11 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-09 16:40:11 -0800
commit2feb6f04d561517b33b91b774561207d7939d983 (patch)
tree236eb0f5ea4694ab6950f6ef975119eaa8899ed2 /include
parentf9e697a27f5ca0432289b30cbda83882bdce7643 (diff)
[PATCH] add and use COMPAT_SIGEV_PAD_SIZE
All the 32 bit architectures (effectively) define SIGEV_PAD_SIZE to be ((SIGEV_MAX_SIZE/sizeof(int)) - 3). So define COMPAT_SIGEV_PAD_SIZE to be this and replace SIGEV_PAD_SIZE32 where it is used. It also needs to be used in the definition of struct compat_sigevent as most of the architectures would have had it 4 bytes too small in the kernel (since we were using SIGEV_PAD_SIZE). 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')
-rw-r--r--include/asm-sparc64/siginfo.h3
-rw-r--r--include/linux/compat.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h
index 49952c6a23eb..2a68c7e32963 100644
--- a/include/asm-sparc64/siginfo.h
+++ b/include/asm-sparc64/siginfo.h
@@ -4,7 +4,6 @@
#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
-#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define __ARCH_SI_TRAPNO
@@ -47,7 +46,7 @@ typedef struct sigevent32 {
int sigev_signo;
int sigev_notify;
union {
- int _pad[SIGEV_PAD_SIZE32];
+ int _pad[COMPAT_SIGEV_PAD_SIZE];
struct {
u32 _function;
diff --git a/include/linux/compat.h b/include/linux/compat.h
index a88f61daa5b5..af1ea468bca3 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -101,12 +101,14 @@ typedef union compat_sigval {
compat_uptr_t sival_ptr;
} compat_sigval_t;
+#define COMPAT_SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
+
typedef struct compat_sigevent {
compat_sigval_t sigev_value;
compat_int_t sigev_signo;
compat_int_t sigev_notify;
union {
- compat_int_t _pad[SIGEV_PAD_SIZE];
+ compat_int_t _pad[COMPAT_SIGEV_PAD_SIZE];
compat_int_t _tid;
struct {