* Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _SYSTEM_SIGNAL_DEFS_H
#define _SYSTEM_SIGNAL_DEFS_H
#include <signal.h>
#include <unistd.h>
#define MAX_QUEUED_SIGNALS _POSIX_SIGQUEUE_MAX
#define SIGNAL_REALTIME_MIN 33
#define SIGNAL_REALTIME_MAX 40
#define MAX_SIGNAL_NUMBER SIGNAL_REALTIME_MAX
#define SIGNAL_FLAG_QUEUING_REQUIRED (0x10000)
#define SIGNAL_FLAG_SEND_TO_THREAD (0x20000)
#define SA_BEOS_COMPATIBLE_HANDLER 0x80000000
#define SIGNAL_TO_MASK(signal) ((sigset_t)1 << ((signal) - 1))
#define SIGNAL_RANGE_TO_MASK(first, last) \
((((SIGNAL_TO_MASK(last) - 1) << 1) | 1) & ~(SIGNAL_TO_MASK(first) - 1))
#endif