summaryrefslogtreecommitdiffstats
path: root/include/linux/personality.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
commitb9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch)
tree42d07b0c7246ae2536a702e7c5de9e2732341116 /include/linux/personality.h
parent7406b0a326f2d70ade2671c37d1beef62249db97 (diff)
Merge with 2.3.99-pre6.
Diffstat (limited to 'include/linux/personality.h')
-rw-r--r--include/linux/personality.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/personality.h b/include/linux/personality.h
index 7607cf6ff..58cab509e 100644
--- a/include/linux/personality.h
+++ b/include/linux/personality.h
@@ -3,7 +3,7 @@
#include <linux/linkage.h>
#include <linux/ptrace.h>
-
+#include <asm/current.h>
/* Flags for bug emulation. These occupy the top three bytes. */
#define STICKY_TIMEOUTS 0x4000000
@@ -22,6 +22,7 @@
#define PER_WYSEV386 (0x0004 | STICKY_TIMEOUTS)
#define PER_ISCR4 (0x0005 | STICKY_TIMEOUTS)
#define PER_BSD (0x0006)
+#define PER_SUNOS (PER_BSD | STICKY_TIMEOUTS)
#define PER_XENIX (0x0007 | STICKY_TIMEOUTS)
#define PER_LINUX32 (0x0008)
#define PER_IRIX32 (0x0009 | STICKY_TIMEOUTS) /* IRIX5 32-bit */
@@ -51,11 +52,17 @@ struct exec_domain {
extern struct exec_domain default_exec_domain;
-extern struct exec_domain *lookup_exec_domain(unsigned long personality);
extern int register_exec_domain(struct exec_domain *it);
extern int unregister_exec_domain(struct exec_domain *it);
#define put_exec_domain(it) \
if (it && it->module) __MOD_DEC_USE_COUNT(it->module);
+#define get_exec_domain(it) \
+ if (it && it->module) __MOD_INC_USE_COUNT(it->module);
+extern void __set_personality(unsigned long personality);
+#define set_personality(pers) do { \
+ if (current->personality != pers) \
+ __set_personality(pers); \
+} while (0)
asmlinkage long sys_personality(unsigned long personality);
#endif /* _PERSONALITY_H */