root/include/asm-sparc/signal.h

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

INCLUDED FROM


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

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