1#ifndef _SIGNAL_H_ 2#define _SIGNAL_H_ 3 4#include "_ansi.h" 5#include <sys/signal.h> 6 7_BEGIN_STD_C 8 9 /* Indicate that we honor AEABI portability if requested. */ 10#if defined _AEABI_PORTABILITY_LEVEL && _AEABI_PORTABILITY_LEVEL != 0 && !defined _AEABI_PORTABLE 11# define _AEABI_PORTABLE 12#endif 13 14typedef int sig_atomic_t; /* Atomic entity type (ANSI) */ 15#ifndef _POSIX_SOURCE 16typedef _sig_func_ptr sig_t; /* BSD naming */ 17typedef _sig_func_ptr sighandler_t; /* glibc naming */ 18#endif /* !_POSIX_SOURCE */ 19 20#ifdef _AEABI_PORTABLE 21void _EXFUN(__aeabi_SIG_DFL, (int)); 22void _EXFUN(__aeabi_SIG_IGN, (int)); 23void _EXFUN(__aeabi_SIG_ERR, (int)); 24 25#define SIG_DFL (__aeabi_SIG_DFL) 26#define SIG_IGN (__aeabi_SIG_IGN) 27#define SIG_ERR (__aeabi_SIG_ERR) 28#else 29#define SIG_DFL ((_sig_func_ptr)0) /* Default action */ 30#define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */ 31#define SIG_ERR ((_sig_func_ptr)-1) /* Error return */ 32#endif 33 34struct _reent; 35 36_sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr)); 37int _EXFUN(_raise_r, (struct _reent *, int)); 38 39#ifndef _REENT_ONLY 40_sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr)); 41int _EXFUN(raise, (int)); 42void _EXFUN(psignal, (int, const char *)); 43#endif 44 45_END_STD_C 46 47#endif /* _SIGNAL_H_ */ 48