xref: /linux/tools/include/nolibc/signal.h (revision 015a99fa76650e7d6efa3e36f20c0f5b346fe9ce)
1 /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
2 /*
3  * signal function definitions for NOLIBC
4  * Copyright (C) 2017-2022 Willy Tarreau <w@1wt.eu>
5  */
6 
7 /* make sure to include all global symbols */
8 #include "nolibc.h"
9 
10 #ifndef _NOLIBC_SIGNAL_H
11 #define _NOLIBC_SIGNAL_H
12 
13 #include "std.h"
14 #include "arch.h"
15 #include "types.h"
16 #include "sys.h"
17 
18 /* This one is not marked static as it's needed by libgcc for divide by zero */
19 int raise(int signal);
20 __attribute__((weak,unused,section(".text.nolibc_raise")))
raise(int signal)21 int raise(int signal)
22 {
23 	return sys_kill(sys_getpid(), signal);
24 }
25 
26 #endif /* _NOLIBC_SIGNAL_H */
27