signal.h 774 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _SIGNAL_H_
  2. #define _SIGNAL_H_
  3. #include "_ansi.h"
  4. #include <sys/cdefs.h>
  5. #include <sys/signal.h>
  6. _BEGIN_STD_C
  7. typedef int sig_atomic_t; /* Atomic entity type (ANSI) */
  8. #if __BSD_VISIBLE
  9. typedef _sig_func_ptr sig_t; /* BSD naming */
  10. #endif
  11. #if __GNU_VISIBLE
  12. typedef _sig_func_ptr sighandler_t; /* glibc naming */
  13. #endif
  14. #define SIG_DFL ((_sig_func_ptr)0) /* Default action */
  15. #define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */
  16. #define SIG_ERR ((_sig_func_ptr)-1) /* Error return */
  17. struct _reent;
  18. _sig_func_ptr _signal_r (struct _reent *, int, _sig_func_ptr);
  19. int _raise_r (struct _reent *, int);
  20. #ifndef _REENT_ONLY
  21. _sig_func_ptr signal (int, _sig_func_ptr);
  22. int raise (int);
  23. void psignal (int, const char *);
  24. #endif
  25. _END_STD_C
  26. #endif /* _SIGNAL_H_ */