diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-06-16 21:10:02 +0200 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-06-28 01:28:40 +0200 |
commit | a3ea84fabacd9cc5bcc3fda67c35e692ca10dc8c (patch) | |
tree | 4de45b002abf5873fc5b19b90f2637e97b663899 /include/asm-parisc/compat.h | |
parent | [PARISC] Update Thibaut Varene's CREDITS entry (diff) | |
download | linux-a3ea84fabacd9cc5bcc3fda67c35e692ca10dc8c.tar.xz linux-a3ea84fabacd9cc5bcc3fda67c35e692ca10dc8c.zip |
[PARISC] Add is_compat_task() helper
... And convert signal.c and ptrace.c to use it instead of open
coded equivalents.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include/asm-parisc/compat.h')
-rw-r--r-- | include/asm-parisc/compat.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h index 289624d8b2d4..71b4eeea205a 100644 --- a/include/asm-parisc/compat.h +++ b/include/asm-parisc/compat.h @@ -5,6 +5,7 @@ */ #include <linux/types.h> #include <linux/sched.h> +#include <linux/personality.h> #define COMPAT_USER_HZ 100 @@ -149,4 +150,14 @@ static __inline__ void __user *compat_alloc_user_space(long len) return (void __user *)regs->gr[30]; } +static inline int __is_compat_task(struct task_struct *t) +{ + return personality(t->personality) == PER_LINUX32; +} + +static inline int is_compat_task(void) +{ + return __is_compat_task(current); +} + #endif /* _ASM_PARISC_COMPAT_H */ |