include/signal.h: Change type of SIG_IGN and related defines to _sa_handler_t

This commit is contained in:
Aleksandr Vyhovanec 2016-06-07 06:56:19 -06:00 committed by Gregory Nutt
parent 08fd09b8fe
commit c939bbe47a
2 changed files with 11 additions and 9 deletions

View File

@ -11916,3 +11916,6 @@
kfazz (2016-06).
* arch/arm/src/stm32: Add support for the STM32F105R. From Konstantin
Berezenko (2016-06-06).
* include/signal.h: Change type of SIG_ERR, SIG_IGN, ... to
_sa_handler_t. They type void does not work with the IAR toolchain.
From Aleksandr Vyhovanec (2016-06-07).

View File

@ -175,22 +175,21 @@
/* Special values of of sa_handler used by sigaction and sigset. They are all
* treated like NULL for now. This is okay for SIG_DFL and SIG_IGN because
* in NuttX, the default action for all signals is to ignore them.
*
* REVISIT: Need to distinguish the value of SIG_HOLD. It is needed in the
* implementation of sigset() but would need to be recognized in all signal
* functions that deal with signal disposition.
*/
#define SIG_ERR ((CODE void *)-1) /* And error occurred */
#define SIG_DFL ((CODE void *)0) /* Default is SIG_IGN for all signals */
#define SIG_IGN ((CODE void *)0) /* Ignore the signal */
#define SIG_HOLD ((CODE void *)1) /* Used only with sigset() */
#define SIG_ERR ((_sa_handler_t)-1) /* And error occurred */
#define SIG_DFL ((_sa_handler_t)0) /* Default is SIG_IGN for all signals */
#define SIG_IGN ((_sa_handler_t)0) /* Ignore the signal */
#define SIG_HOLD ((_sa_handler_t)1) /* Used only with sigset() */
/********************************************************************************
* Public Type Definitions
********************************************************************************/
/* This defines a set of 32 signals (numbered 0 through 31). */
/* This defines a set of 32 signals (numbered 0 through 31).
* REVISIT: Signal 0 is, however, not generally usable since that value has
* special meaning in some circumstances (e.g., kill()).
*/
typedef uint32_t sigset_t; /* Bit set of 32 signals */
#define __SIGSET_T_DEFINED 1