diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:00 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:32 -0500 |
commit | bd5969fc876a10b18613302db7087ef3c40f18e1 (patch) | |
tree | 7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/ansi/include/signal.h | |
parent | a95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff) |
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/ansi/include/signal.h')
-rw-r--r-- | lib/mlibc/options/ansi/include/signal.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/mlibc/options/ansi/include/signal.h b/lib/mlibc/options/ansi/include/signal.h new file mode 100644 index 0000000..e27592b --- /dev/null +++ b/lib/mlibc/options/ansi/include/signal.h @@ -0,0 +1,48 @@ +#ifndef _SIGNAL_H +#define _SIGNAL_H + +#include <abi-bits/signal.h> +#include <mlibc-config.h> + +#ifdef __cplusplus +extern "C" { +#endif + +// [7.14] Signal handling basics + +typedef int sig_atomic_t; + +#define CLD_EXITED 1 +#define CLD_KILLED 2 +#define CLD_DUMPED 3 +#define CLD_TRAPPED 4 +#define CLD_STOPPED 5 +#define CLD_CONTINUED 6 + +#ifndef __MLIBC_ABI_ONLY + +// [7.14.1] signal() function + +__sighandler signal(int sig, __sighandler handler); + +// [7.14.2] raise() function + +int raise(int sig); + +#endif /* !__MLIBC_ABI_ONLY */ + +#define _NSIG NSIG + +#ifdef __cplusplus +} +#endif + +#if __MLIBC_POSIX_OPTION +# include <bits/posix/posix_signal.h> +#endif + +#if __MLIBC_GLIBC_OPTION +# include <bits/glibc/glibc_signal.h> +#endif + +#endif // _SIGNAL_H |