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
This commit is contained in:
patacongo
2013-01-10 18:31:08 +00:00
parent f6485fe177
commit b7369de8e4
7 changed files with 235 additions and 46 deletions
+16 -2
View File
@@ -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
}