1 
   2 #ifndef _ASMSPARC_SIGNAL_H
   3 #define _ASMSPARC_SIGNAL_H
   4 
   5 
   6 
   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 
  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   
  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 
  83 struct sigstack {
  84         char *the_stack;
  85         int   cur_status;
  86 };
  87 
  88 
  89 #define SV_SSTACK    1     
  90 #define SV_INTR      2     
  91 #define SV_RESET     4     
  92 #define SV_IGNCHILD  8     
  93 
  94 
  95 
  96 
  97 
  98 
  99 
 100 
 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 
 110 #define SIG_UNBLOCK        0x40 
 111 #define SIG_SETMASK        0x80 
 112 
 113 #ifdef __KERNEL__
 114 
 115 
 116 
 117 
 118 
 119 
 120 #define SA_PROBE SA_ONESHOT
 121 #define SA_SAMPLE_RANDOM SA_RESTART
 122 #endif
 123 
 124 
 125 typedef void (*__sighandler_t)(int, int, struct sigcontext_struct *, char *);
 126 
 127 #define SIG_DFL ((__sighandler_t)0)     
 128 #define SIG_IGN ((__sighandler_t)1)     
 129 #define SIG_ERR ((__sighandler_t)-1)    
 130 
 131 struct sigaction {
 132         __sighandler_t  sa_handler;
 133         sigset_t        sa_mask;
 134         unsigned long   sa_flags;
 135 };
 136 
 137 #endif 
 138 
 139 #endif