2005-03-09 04:42:37 +03:00
|
|
|
/*
|
2007-08-16 22:01:47 +04:00
|
|
|
* Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
2005-03-09 04:42:37 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2003-01-27 05:54:21 +03:00
|
|
|
#ifndef _KERNEL_SIGNAL_H
|
|
|
|
#define _KERNEL_SIGNAL_H
|
|
|
|
|
2004-09-01 16:02:26 +04:00
|
|
|
|
2005-02-10 05:49:41 +03:00
|
|
|
#include <KernelExport.h>
|
2003-01-27 05:54:21 +03:00
|
|
|
#include <signal.h>
|
|
|
|
|
2005-03-09 04:42:37 +03:00
|
|
|
|
2005-02-25 17:16:07 +03:00
|
|
|
#define KILL_SIGNALS ((1L << (SIGKILL - 1)) | (1L << (SIGKILLTHR - 1)))
|
2003-01-27 05:54:21 +03:00
|
|
|
|
2007-09-04 01:35:24 +04:00
|
|
|
#define SIGNAL_TO_MASK(signal) (1LL << (signal - 1))
|
|
|
|
|
2007-09-06 06:03:43 +04:00
|
|
|
// additional send_signal_etc() flag
|
|
|
|
#define SIGNAL_FLAG_TEAMS_LOCKED (0x10000)
|
|
|
|
// interrupts are disabled and team lock is held
|
|
|
|
|
2003-01-27 05:54:21 +03:00
|
|
|
|
2005-02-25 17:16:07 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-10-20 20:56:04 +04:00
|
|
|
extern bool handle_signals(struct thread *thread);
|
2005-03-09 04:42:37 +03:00
|
|
|
extern bool is_kill_signal_pending(void);
|
2005-04-29 15:41:12 +04:00
|
|
|
extern int has_signals_pending(void *_thread);
|
2007-09-06 06:03:43 +04:00
|
|
|
extern bool is_signal_blocked(int signal);
|
2003-01-27 05:54:21 +03:00
|
|
|
|
2005-03-13 00:45:49 +03:00
|
|
|
extern int sigaction_etc(thread_id threadID, int signal,
|
2007-08-16 22:01:47 +04:00
|
|
|
const struct sigaction *newAction, struct sigaction *oldAction);
|
2005-03-13 00:45:49 +03:00
|
|
|
|
2007-08-16 22:01:47 +04:00
|
|
|
extern status_t _user_send_signal(pid_t tid, uint sig);
|
|
|
|
extern status_t _user_sigprocmask(int how, const sigset_t *set,
|
|
|
|
sigset_t *oldSet);
|
|
|
|
extern status_t _user_sigaction(int sig, const struct sigaction *newAction,
|
|
|
|
struct sigaction *oldAction);
|
2004-08-29 00:45:00 +04:00
|
|
|
extern bigtime_t _user_set_alarm(bigtime_t time, uint32 mode);
|
2007-08-16 22:01:47 +04:00
|
|
|
extern status_t _user_sigsuspend(const sigset_t *mask);
|
|
|
|
extern status_t _user_sigpending(sigset_t *set);
|
|
|
|
extern status_t _user_set_signal_stack(const stack_t *newUserStack,
|
|
|
|
stack_t *oldUserStack);
|
2003-01-27 05:54:21 +03:00
|
|
|
|
2005-02-25 17:16:07 +03:00
|
|
|
#ifdef __cplusplus
|
2005-10-20 20:56:04 +04:00
|
|
|
}
|
2005-02-25 17:16:07 +03:00
|
|
|
#endif
|
|
|
|
|
2003-01-27 05:54:21 +03:00
|
|
|
#endif /* _KERNEL_SIGNAL_H */
|