home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc / include / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-29  |  2.1 KB  |  80 lines

  1. /*
  2.  *    VAX-11 "C" runtime compatible signal definitions
  3.  */
  4. #ifndef    NSIG
  5. #define NSIG    32        /* number of signals */
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. #define    SIGHUP    1        /* hangup */
  12. #define    SIGINT    2        /* interrupt */
  13. #define    SIGQUIT    3        /* quit */
  14. #define    SIGILL    4        /* illegal instruction (not reset when caught) */
  15. #define    ILL_RESAD_FAULT    0x0    /* reserved addressing mode fault */
  16. #define    ILL_PRIVIN_FAULT 0x1    /* privilidged instruction fault */
  17. #define    ILL_RESOP_FAULT    0x2    /* reserved operand fault */
  18. #define    SIGTRAP    5        /* trace trap (not reset when caught) */
  19. #define    SIGIOT    6        /* IOT instruction */
  20. #define    SIGEMT    7        /* EMT instruction */
  21. #define    SIGFPE    8        /* floating point exception */
  22. #define    FPE_INTOVF_TRAP 0x1
  23. #define    FPE_INTDIV_TRAP 0x2
  24. #define    FPE_FLTOVF_TRAP 0x3
  25. #define    FPE_FLTDIV_TRAP 0x4
  26. #define    FPE_FLTUND_TRAP 0x5
  27. #define    FPE_DECOVF_TRAP 0x6
  28. #define    FPE_SUBRNG_TRAP 0x7
  29. #define FPE_FLTOVF_FAULT 0x8
  30. #define FPE_FLTDIV_FAULT 0x9
  31. #define FPE_FLTUND_FAULT 0xa
  32. #define    SIGKILL    9        /* kill (cannot be caught or ignored) */
  33. #define    SIGBUS    10        /* bus error */
  34. #define    SIGSEGV    11        /* segmentation violation */
  35. #define SIGSYS    12        /* bad argument to system call */
  36. #define SIGPIPE    13        /* write to a pipe with no one to read it */
  37. #define SIGALRM    14        /* alarm clock */
  38. #define SIGTERM    15        /* software termination signal from kill */
  39.  
  40.  
  41. struct    sigvec
  42. {
  43.     int    (*sv_handler)();    /* handler address */
  44.     int    sv_mask;        /* mask of signals to be blocked */
  45.     int    sv_onstack;        /* flag to indicate signal stack */
  46. };
  47.  
  48. struct    sigcontext
  49. {
  50.     int    sc_onstack;        /* signal stack flag to restore */
  51.     int    sc_mask;        /* signal mask to restore */
  52.     int    sc_sp;            /* stack pointerto restore */
  53.     int    sc_pc;            /* pc to return to */
  54.     int    sc_ps;            /* psl to restore */
  55. };
  56.  
  57. struct    sigstack
  58. {
  59.     char    *ss_sp;            /* signal stack pointer */
  60.     int    ss_onstack;        /* current status */
  61. };
  62.  
  63. #define sigmask(n) ((unsigned long) 1 << ((n) - 1))
  64.  
  65. #ifdef COMPILING_LIBGXX_TESTS
  66. void    (*signal())(),(*ssignal())();
  67. #else
  68. int    (*signal())(),(*ssignal())();
  69. #endif
  70.  
  71. #define    BADSIG    (int (*)())-1
  72. #define    SIG_DFL    (int (*)())0    /* default */
  73. #define SIG_IGN    (int (*)())1    /* ignore */
  74.  
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78.  
  79. #endif    NSIG
  80.