home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 13 / DJCRX201.ZIP / include / signal.h < prev    next >
C/C++ Source or Header  |  1996-04-26  |  2KB  |  93 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_signal_h_
  3. #define __dj_include_signal_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  10.  
  11. #include <sys/djtypes.h>
  12.  
  13. /* 256 software interrupts + 32 exceptions = 288 */
  14.  
  15. #define SIGABRT    288
  16. #define SIGFPE    289
  17. #define SIGILL    290
  18. #define SIGSEGV    291
  19. #define SIGTERM    292
  20. #define SIGINT  295
  21.  
  22. #define SIG_DFL ((void (*)(int))(0))
  23. #define SIG_ERR    ((void (*)(int))(1))
  24. #define SIG_IGN    ((void (*)(int))(-1))
  25.  
  26. __DJ_pid_t
  27. #undef __DJ_pid_t
  28. #define __DJ_pid_t
  29.  
  30. typedef int sig_atomic_t;
  31.  
  32. int    raise(int _sig);
  33. void    (*signal(int _sig, void (*_func)(int)))(int);
  34.   
  35. #ifndef __STRICT_ANSI__
  36.  
  37. #define SA_NOCLDSTOP    1
  38.  
  39. #define SIGALRM    293
  40. #define SIGHUP    294
  41. /* SIGINT is ansi */
  42. #define SIGKILL    296
  43. #define SIGPIPE    297
  44. #define SIGQUIT    298
  45. #define SIGUSR1    299
  46. #define SIGUSR2    300
  47.  
  48. #define SIG_BLOCK    1
  49. #define SIG_SETMASK    2
  50. #define SIG_UNBLOCK    3
  51.  
  52. typedef struct {
  53.   unsigned long __bits[10]; /* max 320 signals */
  54. } sigset_t;
  55.  
  56. struct sigaction {
  57.   int sa_flags;
  58.   void (*sa_handler)(int);
  59.   sigset_t sa_mask;
  60. };
  61.  
  62. int    kill(pid_t _pid, int _sig);
  63. int    sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact);
  64. int    sigaddset(sigset_t *_set, int _signo);
  65. int    sigdelset(sigset_t *_set, int _signo);
  66. int    sigemptyset(sigset_t *_set);
  67. int    sigfillset(sigset_t *_set);
  68. int    sigismember(const sigset_t *_set, int _signo);
  69. int    sigpending(sigset_t *_set);
  70. int    sigprocmask(int _how, const sigset_t *_set, sigset_t *_oset);
  71. int    sigsuspend(const sigset_t *_set);
  72.  
  73. #ifndef _POSIX_SOURCE
  74.  
  75. #define SIGNOFP 301
  76. #define SIGTRAP 302
  77. #define SIGTIMR 303    /* Internal for setitimer (SIGALRM, SIGPROF) */
  78. #define SIGPROF 304
  79. #define SIGMAX 320
  80.  
  81. #endif /* !_POSIX_SOURCE */
  82. #endif /* !__STRICT_ANSI__ */
  83. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  84.  
  85. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  86. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92. #endif /* !__dj_include_signal_h_ */
  93.