~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/personality.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _PERSONALITY_H
  2 #define _PERSONALITY_H
  3 
  4 #include <linux/linkage.h>
  5 #include <linux/ptrace.h>
  6 #include <asm/current.h>
  7 
  8 /* Flags for bug emulation. These occupy the top three bytes. */
  9 #define STICKY_TIMEOUTS         0x4000000
 10 #define WHOLE_SECONDS           0x2000000
 11 #define ADDR_LIMIT_32BIT        0x0800000
 12 
 13 /* Personality types. These go in the low byte. Avoid using the top bit,
 14  * it will conflict with error returns.
 15  */
 16 #define PER_MASK                (0x00ff)
 17 #define PER_LINUX               (0x0000)
 18 #define PER_LINUX_32BIT         (0x0000 | ADDR_LIMIT_32BIT)
 19 #define PER_SVR4                (0x0001 | STICKY_TIMEOUTS)
 20 #define PER_SVR3                (0x0002 | STICKY_TIMEOUTS)
 21 #define PER_SCOSVR3             (0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS)
 22 #define PER_WYSEV386            (0x0004 | STICKY_TIMEOUTS)
 23 #define PER_ISCR4               (0x0005 | STICKY_TIMEOUTS)
 24 #define PER_BSD                 (0x0006)
 25 #define PER_SUNOS               (PER_BSD | STICKY_TIMEOUTS)
 26 #define PER_XENIX               (0x0007 | STICKY_TIMEOUTS)
 27 #define PER_LINUX32             (0x0008)
 28 #define PER_IRIX32              (0x0009 | STICKY_TIMEOUTS) /* IRIX5 32-bit     */
 29 #define PER_IRIXN32             (0x000a | STICKY_TIMEOUTS) /* IRIX6 new 32-bit */
 30 #define PER_IRIX64              (0x000b | STICKY_TIMEOUTS) /* IRIX6 64-bit     */
 31 #define PER_RISCOS              (0x000c)
 32 #define PER_SOLARIS             (0x000d | STICKY_TIMEOUTS)
 33 
 34 /* Prototype for an lcall7 syscall handler. */
 35 typedef void (*lcall7_func)(int, struct pt_regs *);
 36 
 37 
 38 /* Description of an execution domain - personality range supported,
 39  * lcall7 syscall handler, start up / shut down functions etc.
 40  * N.B. The name and lcall7 handler must be where they are since the
 41  * offset of the handler is hard coded in kernel/sys_call.S.
 42  */
 43 struct exec_domain {
 44         const char *name;
 45         lcall7_func handler;
 46         unsigned char pers_low, pers_high;
 47         unsigned long * signal_map;
 48         unsigned long * signal_invmap;
 49         struct module * module;
 50         struct exec_domain *next;
 51 };
 52 
 53 extern struct exec_domain default_exec_domain;
 54 
 55 extern int register_exec_domain(struct exec_domain *it);
 56 extern int unregister_exec_domain(struct exec_domain *it);
 57 #define put_exec_domain(it) \
 58         if (it && it->module) __MOD_DEC_USE_COUNT(it->module);
 59 #define get_exec_domain(it) \
 60         if (it && it->module) __MOD_INC_USE_COUNT(it->module);
 61 extern void __set_personality(unsigned long personality);
 62 #define set_personality(pers) do {      \
 63         if (current->personality != pers) \
 64                 __set_personality(pers); \
 65 } while (0)
 66 asmlinkage long sys_personality(unsigned long personality);
 67 
 68 #endif /* _PERSONALITY_H */
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.