[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>
This commit is contained in:
parent
d71624c95a
commit
a3ea84faba
3 changed files with 25 additions and 14 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue