xref: /haiku/headers/private/kernel/ksignal.h (revision 24159a0c7d6d6dcba9f2a0c1a7c08d2c8167f21b)
1 /*
2  * Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _KERNEL_SIGNAL_H
6 #define _KERNEL_SIGNAL_H
7 
8 
9 #include <KernelExport.h>
10 #include <signal.h>
11 
12 
13 #define KILL_SIGNALS	((1L << (SIGKILL - 1)) | (1L << (SIGKILLTHR - 1)))
14 
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 extern bool handle_signals(struct thread *thread);
21 extern bool is_kill_signal_pending(void);
22 extern int has_signals_pending(void *_thread);
23 
24 extern int sigaction_etc(thread_id threadID, int signal,
25 				const struct sigaction *act, struct sigaction *oldAction);
26 
27 extern int _user_send_signal(pid_t tid, uint sig);
28 extern int _user_sigprocmask(int how, const sigset_t *set, sigset_t *oldSet);
29 extern int _user_sigaction(int sig, const struct sigaction *action,
30 				struct sigaction *oldAction);
31 extern bigtime_t _user_set_alarm(bigtime_t time, uint32 mode);
32 extern int _user_sigsuspend(const sigset_t *mask);
33 extern int _user_sigpending(sigset_t *set);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif	/* _KERNEL_SIGNAL_H */
40