root/include/linux/signal.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_SIGNAL_H
   2 #define _LINUX_SIGNAL_H
   3 
   4 typedef unsigned int sigset_t;          /* 32 bits */
   5 
   6 #define _NSIG             32
   7 #define NSIG            _NSIG
   8 
   9 #define SIGHUP           1
  10 #define SIGINT           2
  11 #define SIGQUIT          3
  12 #define SIGILL           4
  13 #define SIGTRAP          5
  14 #define SIGABRT          6
  15 #define SIGIOT           6
  16 #define SIGUNUSED        7
  17 #define SIGFPE           8
  18 #define SIGKILL          9
  19 #define SIGUSR1         10
  20 #define SIGSEGV         11
  21 #define SIGUSR2         12
  22 #define SIGPIPE         13
  23 #define SIGALRM         14
  24 #define SIGTERM         15
  25 #define SIGSTKFLT       16
  26 #define SIGCHLD         17
  27 #define SIGCONT         18
  28 #define SIGSTOP         19
  29 #define SIGTSTP         20
  30 #define SIGTTIN         21
  31 #define SIGTTOU         22
  32 
  33 /*
  34  * Most of these aren't used yet (and perhaps never will),
  35  * so they are commented out.
  36  */
  37 
  38 
  39 #define SIGIO           23
  40 #define SIGPOLL         SIGIO
  41 #define SIGURG          SIGIO
  42 #define SIGXCPU         24
  43 #define SIGXFSZ         25
  44 
  45 
  46 #define SIGVTALRM       26
  47 #define SIGPROF         27
  48 
  49 #define SIGWINCH        28
  50 
  51 /*
  52 #define SIGLOST         29
  53 */
  54 #define SIGPWR          30
  55 
  56 /* Arggh. Bad user source code wants this.. */
  57 #define SIGBUS          SIGUNUSED
  58 
  59 /*
  60  * sa_flags values: SA_STACK is not currently supported, but will allow the
  61  * usage of signal stacks by using the (now obsolete) sa_restorer field in
  62  * the sigaction structure as a stack pointer. This is now possible due to
  63  * the changes in signal handling. LBT 010493.
  64  * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
  65  * SA_RESTART flag to get restarting signals (which were the default long ago)
  66  */
  67 #define SA_NOCLDSTOP    1
  68 #define SA_STACK        0x08000000
  69 #define SA_RESTART      0x10000000
  70 #define SA_INTERRUPT    0x20000000
  71 #define SA_NOMASK       0x40000000
  72 #define SA_ONESHOT      0x80000000
  73 
  74 #define SIG_BLOCK          0    /* for blocking signals */
  75 #define SIG_UNBLOCK        1    /* for unblocking signals */
  76 #define SIG_SETMASK        2    /* for setting the signal mask */
  77 
  78 /* Type of a signal handler.  */
  79 typedef void (*__sighandler_t)(int);
  80 
  81 #define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
  82 #define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
  83 #define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
  84 
  85 struct sigaction {
  86         __sighandler_t sa_handler;
  87         sigset_t sa_mask;
  88         int sa_flags;
  89         void (*sa_restorer)(void);
  90 };
  91 
  92 #ifdef __KERNEL__
  93 
  94 struct sigcontext_struct {
  95         unsigned short gs, __gsh;
  96         unsigned short fs, __fsh;
  97         unsigned short es, __esh;
  98         unsigned short ds, __dsh;
  99         unsigned long edi;
 100         unsigned long esi;
 101         unsigned long ebp;
 102         unsigned long esp;
 103         unsigned long ebx;
 104         unsigned long edx;
 105         unsigned long ecx;
 106         unsigned long eax;
 107         unsigned long trapno;
 108         unsigned long err;
 109         unsigned long eip;
 110         unsigned short cs, __csh;
 111         unsigned long eflags;
 112         unsigned long esp_at_signal;
 113         unsigned short ss, __ssh;
 114         unsigned long i387;
 115         unsigned long oldmask;
 116         unsigned long cr2;
 117 };
 118 
 119 #endif
 120 
 121 #endif

/* [previous][next][first][last][top][bottom][index][help] */