PatchworkOS
966e257
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
signal.h
Go to the documentation of this file.
1
#ifndef _SIGNAL_H
2
#define _SIGNAL_H 1
3
4
#if defined(__cplusplus)
5
extern
"C"
6
{
7
#endif
8
9
#include <
stdatomic.h
>
10
11
#include "
_internal/config.h
"
12
13
/**
14
* @brief Wrappers around "notes" for ANSI C signal handling.
15
* @defgroup libstd_signal Signal Handling
16
* @ingroup libstd
17
*
18
* For the same of compatibility with ANSI C, we provide these wrappers around "notes" for signal handling. However, it
19
* is preferred to use the native "notes" for IPC instead if possible.
20
*
21
* @{
22
*/
23
24
#define SIGABRT 1
25
#define SIGFPE 2
26
#define SIGILL 3
27
#define SIGINT 4
28
#define SIGSEGV 5
29
#define SIGTERM 6
30
#define SIGMAX 32
31
32
#define SIG_DFL ((void (*)(int))0)
33
#define SIG_ERR ((void (*)(int)) - 1)
34
#define SIG_IGN ((void (*)(int))1)
35
36
typedef
_Atomic
(
int
) sig_atomic_t;
37
38
typedef
void (*
sighandler_t
)(int);
39
40
_PUBLIC
sighandler_t
signal
(
int
sig,
sighandler_t
func);
41
42
_PUBLIC
int
raise
(
int
sig);
43
44
/** @} */
45
46
#if defined(__cplusplus)
47
}
48
#endif
49
50
#endif
raise
_PUBLIC int raise(int sig)
Definition
raise.c:5
signal
_PUBLIC sighandler_t signal(int sig, sighandler_t func)
Definition
signal.c:5
sighandler_t
void(* sighandler_t)(int)
Definition
signal.h:38
config.h
_PUBLIC
#define _PUBLIC
Definition
config.h:41
stdatomic.h
_Atomic
#define _Atomic(T)
Definition
stdatomic.h:59
include
libstd
signal.h
Generated on Mon Dec 15 2025 21:55:53 for PatchworkOS by
1.9.8