home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H386 / SIGNAL.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  3KB  |  70 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)signal.h    6.1 90/11/16";*/
  14. /***
  15. *signal.h - defines signal values and routines
  16. *
  17. *
  18. *Purpose:
  19. *    This file defines the signal values and declares the signal functions.
  20. *    [ANSI/System V]
  21. *
  22. ****/
  23.  
  24. #ifndef    CALLTYPE
  25. #define    CALLTYPE    _cdecl
  26. #endif    /* CALLTYPE */
  27.  
  28.  
  29. #ifndef _SIG_ATOMIC_T_DEFINED
  30. typedef int sig_atomic_t;
  31. #define _SIG_ATOMIC_T_DEFINED
  32. #endif
  33.  
  34.  
  35. #define NSIG 23     /* maximum signal number + 1 */
  36.  
  37. /* signal types */
  38. /* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
  39.  
  40. #define SIGINT        2    /* interrupt - corresponds to DOS 3.x int 23H */
  41. #define SIGILL        4    /* illegal instruction - invalid function image */
  42. #define SIGFPE        8    /* floating point exception */
  43. #define SIGSEGV     11    /* segment violation */
  44. #define SIGTERM     15    /* Software termination signal from kill */
  45. #define SIGUSR1     16    /* User defined signal 1 */
  46. #define SIGUSR2     17    /* User defined signal 2 */
  47. #define SIGUSR3     20    /* User defined signal 3 */
  48. #define SIGBREAK    21    /* Ctrl-Break sequence */
  49. #define SIGABRT     22    /* abnormal termination triggered by abort call */
  50.  
  51.  
  52. /* signal action codes */
  53. /* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
  54.  
  55. #define SIG_DFL (void (CALLTYPE *)())0    /* default signal action */
  56. #define SIG_IGN (void (CALLTYPE *)())1    /* ignore */
  57. #define SIG_SGE (void (CALLTYPE *)())3    /* signal gets error */
  58. #define SIG_ACK (void (CALLTYPE *)())4    /* error if handler not setup */
  59.  
  60.  
  61. /* signal error value (returned by signal call on error) */
  62.  
  63. #define SIG_ERR (void (CALLTYPE *)())-1      /* signal error value */
  64.  
  65.  
  66. /* function prototypes */
  67.  
  68. void (CALLTYPE * CALLTYPE signal(int, void (CALLTYPE *)()))();
  69. int CALLTYPE raise(int);
  70.