diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-10 18:31:08 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-10 18:31:08 +0000 |
commit | 32598c729363bea9903cfaa467519ccb072b36dc (patch) | |
tree | 1bbfd8be66b396406a12040a2f08368f6903f24d /nuttx/include/spawn.h | |
parent | c045ce53e389473aa4f68e295a7eb1e7e2a7b54d (diff) | |
download | px4-nuttx-32598c729363bea9903cfaa467519ccb072b36dc.tar.gz px4-nuttx-32598c729363bea9903cfaa467519ccb072b36dc.tar.bz2 px4-nuttx-32598c729363bea9903cfaa467519ccb072b36dc.zip |
Add missing support for signal masks to posix_spawn.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5505 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/spawn.h')
-rw-r--r-- | nuttx/include/spawn.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/nuttx/include/spawn.h b/nuttx/include/spawn.h index 91092eeb0..3978424fb 100644 --- a/nuttx/include/spawn.h +++ b/nuttx/include/spawn.h @@ -45,6 +45,7 @@ #include <sys/types.h> #include <sched.h> +#include <signal.h> #include <errno.h> /**************************************************************************** @@ -77,6 +78,9 @@ struct posix_spawnattr_s uint8_t flags; uint8_t priority; uint8_t policy; +#ifndef CONFIG_DISABLE_SIGNALS + sigset_t sigmask; +#endif }; typedef struct posix_spawnattr_s posix_spawnattr_t; @@ -155,7 +159,12 @@ int posix_spawnattr_getschedparam(FAR const posix_spawnattr_t *attr, int posix_spawnattr_getschedpolicy(FAR const posix_spawnattr_t *attr, FAR int *policy); #define posix_spawnattr_getsigdefault(attr,sigdefault) (ENOSYS) -#define posix_spawnattr_getsigmask(attr,sigmask) (ENOSYS) +#ifndef CONFIG_DISABLE_SIGNALS +int posix_spawnattr_getsigmask(FAR const posix_spawnattr_t *attr, + FAR sigset_t *sigmask); +#else +# define posix_spawnattr_getsigmask(attr,sigmask) (ENOSYS) +#endif /* Set spawn attributes interfaces */ @@ -165,7 +174,12 @@ int posix_spawnattr_setschedparam(FAR posix_spawnattr_t *attr, FAR const struct sched_param *param); int posix_spawnattr_setschedpolicy(FAR posix_spawnattr_t *attr, int policy); #define posix_spawnattr_setsigdefault(attr,sigdefault) (ENOSYS) -#define posix_spawnattr_setsigmask(attr,sigmask) (ENOSYS) +#ifndef CONFIG_DISABLE_SIGNALS +int posix_spawnattr_setsigmask(FAR posix_spawnattr_t *attr, + FAR const sigset_t *sigmask); +#else +# define posix_spawnattr_setsigmask(attr,sigmask) (ENOSYS) +#endif #ifdef __cplusplus } |