root/include/asm-sparc/signal.h

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

INCLUDED FROM


   1 /* $Id: signal.h,v 1.14 1995/11/25 02:32:46 davem Exp $ */
   2 #ifndef _ASMSPARC_SIGNAL_H
   3 #define _ASMSPARC_SIGNAL_H
   4 
   5 /* On the Sparc the signal handlers get passed a 'sub-signal' code
   6  * for certain signal types, which we document here.
   7  */
   8 #define _NSIG             32
   9 #define NSIG            _NSIG
  10 
  11 #define SIGHUP           1
  12 #define SIGINT           2
  13 #define SIGQUIT          3
  14 #define SIGILL           4
  15 #define    SUBSIG_STACK       0
  16 #define    SUBSIG_ILLINST     2
  17 #define    SUBSIG_PRIVINST    3
  18 #define    SUBSIG_BADTRAP(t)  (0x80 + (n))
  19 
  20 #define SIGTRAP          5
  21 #define SIGABRT          6
  22 #define SIGIOT           6
  23 
  24 #define SIGEMT           7
  25 #define    SUBSIG_TAG    10
  26 
  27 #define SIGFPE           8
  28 #define    SUBSIG_FPDISABLED     0x400
  29 #define    SUBSIG_FPERROR        0x404
  30 #define    SUBSIG_FPINTOVFL      0x001
  31 #define    SUBSIG_FPSTSIG        0x002
  32 #define    SUBSIG_IDIVZERO       0x014
  33 #define    SUBSIG_FPINEXACT      0x0c4
  34 #define    SUBSIG_FPDIVZERO      0x0c8
  35 #define    SUBSIG_FPUNFLOW       0x0cc
  36 #define    SUBSIG_FPOPERROR      0x0d0
  37 #define    SUBSIG_FPOVFLOW       0x0d4
  38 
  39 #define SIGKILL          9
  40 #define SIGBUS          10
  41 #define    SUBSIG_BUSTIMEOUT    1
  42 #define    SUBSIG_ALIGNMENT     2
  43 #define    SUBSIG_MISCERROR     5
  44 
  45 #define SIGSEGV         11
  46 #define    SUBSIG_NOMAPPING     3
  47 #define    SUBSIG_PROTECTION    4
  48 #define    SUBSIG_SEGERROR      5
  49 
  50 #define SIGSYS          12
  51 #define SIGPIPE         13
  52 #define SIGALRM         14
  53 #define SIGTERM         15
  54 #define SIGURG          16
  55 
  56 /* SunOS values which deviate from the Linux/i386 ones */
  57 #define SIGSTOP         17
  58 #define SIGTSTP         18
  59 #define SIGCONT         19
  60 #define SIGCHLD         20
  61 #define SIGTTIN         21
  62 #define SIGTTOU         22
  63 #define SIGIO           23
  64 #define SIGPOLL         SIGIO   /* SysV name for SIGIO */
  65 #define SIGXCPU         24
  66 #define SIGXFSZ         25
  67 #define SIGVTALRM       26
  68 #define SIGPROF         27
  69 #define SIGWINCH        28
  70 #define SIGLOST         29
  71 #define SIGUSR1         30
  72 #define SIGUSR2         31
  73 
  74 #ifndef __ASSEMBLY__
  75 
  76 typedef unsigned long sigset_t;
  77 
  78 #ifdef __KERNEL__
  79 #include <asm/sigcontext.h>
  80 #endif
  81 
  82 /* A SunOS sigstack */
  83 struct sigstack {
  84         char *the_stack;
  85         int   cur_status;
  86 };
  87 
  88 /* Sigvec flags */
  89 #define SV_SSTACK    1     /* This signal handler should use sig-stack */
  90 #define SV_INTR      2     /* Sig return should not restart system ??? */
  91 #define SV_RESET     4     /* Set handler to SIG_DFL upon taken signal */
  92 #define SV_IGNCHILD  8     /* Do not send SIGCHLD */
  93 
  94 /*
  95  * sa_flags values: SA_STACK is not currently supported, but will allow the
  96  * usage of signal stacks by using the (now obsolete) sa_restorer field in
  97  * the sigaction structure as a stack pointer. This is now possible due to
  98  * the changes in signal handling. LBT 010493.
  99  * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
 100  * SA_RESTART flag to get restarting signals (which were the default long ago)
 101  */
 102 #define SA_NOCLDSTOP    SV_IGNCHILD
 103 #define SA_STACK        SV_SSTACK
 104 #define SA_RESTART      SV_RESET
 105 #define SA_INTERRUPT    SV_INTR
 106 #define SA_NOMASK       0x10
 107 #define SA_ONESHOT      0x20
 108 
 109 #define SIG_BLOCK          0x00 /* for blocking signals */
 110 #define SIG_UNBLOCK        0x40 /* for unblocking signals */
 111 #define SIG_SETMASK        0x80 /* for setting the signal mask */
 112 
 113 #ifdef __KERNEL__
 114 /*
 115  * These values of sa_flags are used only by the kernel as part of the
 116  * irq handling routines.
 117  *
 118  * SA_INTERRUPT is also used by the irq handling routines.
 119  */
 120 #define SA_PROBE SA_ONESHOT
 121 #define SA_SAMPLE_RANDOM SA_RESTART
 122 #endif
 123 
 124 /* Type of a signal handler.  */
 125 typedef void (*__sighandler_t)(int, int, struct sigcontext_struct *, char *);
 126 
 127 #define SIG_DFL ((__sighandler_t)0)     /* default signal handling */
 128 #define SIG_IGN ((__sighandler_t)1)     /* ignore signal */
 129 #define SIG_ERR ((__sighandler_t)-1)    /* error return from signal */
 130 
 131 struct sigaction {
 132         __sighandler_t  sa_handler;
 133         sigset_t        sa_mask;
 134         unsigned long   sa_flags;
 135 };
 136 
 137 #endif /* !(__ASSEMBLY__) */
 138 
 139 #endif /* !(_ASMSPARC_SIGNAL_H) */

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