From a6b8754885dde397e3fb0cc45b3115d3d9ed380a Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 4 Dec 2009 15:24:21 +0000 Subject: [PATCH] =?UTF-8?q?2009-12-04=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * posix/include/rtems/posix/sigset.h: New (Split out from posix/include/rtems/posix/psignal.h). --- cpukit/ChangeLog | 5 +++ cpukit/posix/include/rtems/posix/sigset.h | 42 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 cpukit/posix/include/rtems/posix/sigset.h diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index f2a76ffc14..615f242cc1 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2009-12-04 Ralf Corsépius + + * posix/include/rtems/posix/sigset.h: New (Split out from + posix/include/rtems/posix/psignal.h). + 2009-12-04 Ralf Corsépius * posix/Makefile.am: Unconditionally build src/wait.c src/waitpid.c. diff --git a/cpukit/posix/include/rtems/posix/sigset.h b/cpukit/posix/include/rtems/posix/sigset.h new file mode 100644 index 0000000000..338879e5e2 --- /dev/null +++ b/cpukit/posix/include/rtems/posix/sigset.h @@ -0,0 +1,42 @@ +/** + * @file rtems/posix/sigset.h + */ + +/* + * COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#ifndef _RTEMS_POSIX_SIGSET_H +#define _RTEMS_POSIX_SIGSET_H + +#include // sigset_t + +/* + * Currently 32 signals numbered 1-32 are defined + */ + +#define SIGNAL_EMPTY_MASK 0x00000000L +#define SIGNAL_ALL_MASK 0xffffffffL + +static inline sigset_t signo_to_mask( + uint32_t sig +) +{ + return 1u << (sig - 1); +} + +static inline bool is_valid_signo( + int signo +) +{ + return ((signo) >= 1 && (signo) <= 32 ); +} + +#endif