signal.h
上传用户:xiaoan1112
上传日期:2013-04-11
资源大小:19621k
文件大小:2k
源码类别:

操作系统开发

开发平台:

Visual C++

  1. /***
  2. *signal.h - defines signal values and routines
  3. *
  4. *   Copyright (c) 1985-1988, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *   This file defines the signal values and declares the signal functions.
  8. *   [ANSI/System V]
  9. *
  10. *******************************************************************************/
  11. #ifndef NO_EXT_KEYS /* extensions enabled */
  12.     #define _CDECL  cdecl
  13. #else /* extensions not enabled */
  14.     #define _CDECL
  15. #endif /* NO_EXT_KEYS */
  16. #ifndef _SIG_ATOMIC_T_DEFINED
  17. typedef int sig_atomic_t;
  18. #define _SIG_ATOMIC_T_DEFINED
  19. #endif
  20. #define NSIG 23     /* maximum signal number + 1 */
  21. /* signal types */
  22. /* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
  23. #define SIGINT      2   /* interrupt - corresponds to DOS 3.x int 23H */
  24. #define SIGILL      4   /* illegal instruction - invalid function image */
  25. #define SIGFPE      8   /* floating point exception */
  26. #define SIGSEGV     11  /* segment violation */
  27. #define SIGTERM     15  /* Software termination signal from kill */
  28. #define SIGUSR1     16  /* User defined signal 1 */
  29. #define SIGUSR2     17  /* User defined signal 2 */
  30. #define SIGUSR3     20  /* User defined signal 3 */
  31. #define SIGBREAK    21  /* Ctrl-Break sequence */
  32. #define SIGABRT     22  /* abnormal termination triggered by abort call */
  33. /* signal action codes */
  34. /* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
  35. #define SIG_DFL (void (*)())0 /* default signal action */
  36. #define SIG_IGN (void (*)())1 /* ignore */
  37. #define SIG_SGE (void (*)())3 /* signal gets error */
  38. #define SIG_ACK (void (*)())4 /* error if handler not setup */
  39. /* signal error value (returned by signal call on error) */
  40. #define SIG_ERR (void (*)())-1    /* signal error value */
  41. /* function prototypes */
  42. void (_CDECL * _CDECL signal(int, void (_CDECL *)()))();
  43. int _CDECL raise(int);