mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-29 13:03:38 +01:00
cd7fe7a329
This version of signal (which does not rely on a notion of userland processes and is thus excluded from Vhex) follows C99 semantics but does not generate any signals by default. Basically, the signal function sets up function pointers and the signal function calls them. Termination signals call exit() while other signals call _Exit(), which is a quicker program termination similar to abort(). C99 allows programs to long jump out of signal handlers (!) which is unbelievably scary because it would bypass stack switching code in Vhex as well as normal interrupt handler termination in gint.
20 lines
670 B
C
20 lines
670 B
C
#ifndef __BITS_SIGNUM_H__
|
|
# define __BITS_SIGNUM_H__
|
|
|
|
// Define the number of signals
|
|
#define _NSIG 16
|
|
|
|
/* Fake signal functions. */
|
|
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
|
|
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
|
|
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
|
|
|
|
/* ISO C99 signals. */
|
|
#define SIGINT 2 /* Interactive attention signal. */
|
|
#define SIGILL 4 /* Illegal instruction. */
|
|
#define SIGABRT 6 /* Abnormal termination. */
|
|
#define SIGFPE 8 /* Erroneous arithmetic operation. */
|
|
#define SIGSEGV 11 /* Invalid access to storage. */
|
|
#define SIGTERM 15 /* Termination request. */
|
|
|
|
#endif /*__BITS_SIGNUM_H__*/
|