root/include/asm-mips/signal.h

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

INCLUDED FROM


   1 #ifndef __ASM_MIPS_SIGNAL_H
   2 #define __ASM_MIPS_SIGNAL_H
   3 
   4 /*
   5  * For now ...
   6  */
   7 #include <linux/types.h>
   8 typedef __u64   sigset_t;
   9 
  10 #if 0
  11 /*
  12  * This is what we should really use but the kernel can't handle
  13  * a non-scalar type yet.  Since we use 64 signals only anyway we
  14  * just use __u64 and pad another 64 bits in the kernel for now ...
  15  */
  16 typedef struct {
  17         unsigned int    sigbits[4];
  18 } sigset_t;
  19 #endif
  20 
  21 #define _NSIG           65
  22 #define NSIG            _NSIG
  23 
  24 /*
  25  * For 1.3.0 Linux/MIPS changed the signal numbers to be compatible the ABI.
  26  */
  27 #define SIGHUP           1      /* Hangup (POSIX).  */
  28 #define SIGINT           2      /* Interrupt (ANSI).  */
  29 #define SIGQUIT          3      /* Quit (POSIX).  */
  30 #define SIGILL           4      /* Illegal instruction (ANSI).  */
  31 #define SIGTRAP          5      /* Trace trap (POSIX).  */
  32 #define SIGIOT           6      /* IOT trap (4.2 BSD).  */
  33 #define SIGABRT          SIGIOT /* Abort (ANSI).  */
  34 #define SIGEMT           7
  35 #define SIGFPE           8      /* Floating-point exception (ANSI).  */
  36 #define SIGKILL          9      /* Kill, unblockable (POSIX).  */
  37 #define SIGBUS          10      /* BUS error (4.2 BSD).  */
  38 #define SIGSEGV         11      /* Segmentation violation (ANSI).  */
  39 #define SIGSYS          12
  40 #define SIGPIPE         13      /* Broken pipe (POSIX).  */
  41 #define SIGALRM         14      /* Alarm clock (POSIX).  */
  42 #define SIGTERM         15      /* Termination (ANSI).  */
  43 #define SIGUSR1         16      /* User-defined signal 1 (POSIX).  */
  44 #define SIGUSR2         17      /* User-defined signal 2 (POSIX).  */
  45 #define SIGCHLD         18      /* Child status has changed (POSIX).  */
  46 #define SIGCLD          SIGCHLD /* Same as SIGCHLD (System V).  */
  47 #define SIGPWR          19      /* Power failure restart (System V).  */
  48 #define SIGWINCH        20      /* Window size change (4.3 BSD, Sun).  */
  49 #define SIGURG          21      /* Urgent condition on socket (4.2 BSD).  */
  50 #define SIGIO           22      /* I/O now possible (4.2 BSD).  */
  51 #define SIGPOLL         SIGIO   /* Pollable event occured (System V).  */
  52 #define SIGSTOP         23      /* Stop, unblockable (POSIX).  */
  53 #define SIGTSTP         24      /* Keyboard stop (POSIX).  */
  54 #define SIGCONT         25      /* Continue (POSIX).  */
  55 #define SIGTTIN         26      /* Background read from tty (POSIX).  */
  56 #define SIGTTOU         27      /* Background write to tty (POSIX).  */
  57 #define SIGVTALRM       28      /* Virtual alarm clock (4.2 BSD).  */
  58 #define SIGPROF         29      /* Profiling alarm clock (4.2 BSD).  */
  59 #define SIGXCPU         30      /* CPU limit exceeded (4.2 BSD).  */
  60 #define SIGXFSZ         31      /* File size limit exceeded (4.2 BSD).  */
  61 
  62 /*
  63  * sa_flags values: SA_STACK is not currently supported, but will allow the
  64  * usage of signal stacks by using the (now obsolete) sa_restorer field in
  65  * the sigaction structure as a stack pointer. This is now possible due to
  66  * the changes in signal handling. LBT 010493.
  67  * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
  68  * SA_RESTART flag to get restarting signals (which were the default long ago)
  69  */
  70 #define SA_STACK        0x1
  71 #define SA_ONSTACK      SA_STACK
  72 #define SA_RESTART      0x4
  73 #define SA_NOCLDSTOP    0x20000
  74 /* Non ABI signals */
  75 #define SA_INTERRUPT    0x01000000
  76 #define SA_NOMASK       0x02000000
  77 #define SA_ONESHOT      0x04000000
  78 
  79 #ifdef __KERNEL__
  80 /*
  81  * These values of sa_flags are used only by the kernel as part of the
  82  * irq handling routines.
  83  *
  84  * SA_INTERRUPT is also used by the irq handling routines.
  85  */
  86 #define SA_PROBE SA_ONESHOT
  87 #define SA_SAMPLE_RANDOM SA_RESTART
  88 #endif
  89 
  90 #define SIG_BLOCK          1    /* for blocking signals */
  91 #define SIG_UNBLOCK        2    /* for unblocking signals */
  92 #define SIG_SETMASK        3    /* for setting the signal mask */
  93 
  94 /* Type of a signal handler.  */
  95 typedef void (*__sighandler_t)(int);
  96 
  97 /* Fake signal functions */
  98 #define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
  99 #define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
 100 #define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
 101 
 102 struct sigaction {
 103         unsigned int    sa_flags;
 104         __sighandler_t  sa_handler;
 105         sigset_t        sa_mask;
 106         /*
 107          * To keep the ABI structure size we have to fill a little gap ...
 108          */
 109         unsigned int    sa_mask_pad[2];
 110 
 111         /* Abi says here follows reserved int[2] */
 112         void            (*sa_restorer)(void);
 113 #if __mips < 3
 114         /*
 115          * For 32 bit code we have to pad struct sigaction to get
 116          * constant size for the ABI
 117          */
 118         int             pad0[1];        /* reserved */
 119 #endif
 120 };
 121 
 122 #ifdef __KERNEL__
 123 #include <asm/sigcontext.h>
 124 #endif
 125 
 126 #endif /* __ASM_MIPS_SIGNAL_H */

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