blob: 985fa3937bf357757fec5c4c62ff4c5064b64c4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stddef.h>
#include "_signal.h"
#include "_safety.h"
void __signal_handler(int sig)
{
__signal.current = sig;
if (__signal.handlers[sig] != NULL) {
__signal.handlers[sig](sig);
}
/* TODO: if signal is fatal, trigger UB */
__signal.current = 0;
}
/*
STDC(0)
SIGNAL_SAFE(0)
*/
|