sched/signal and syscall/: Add support for pselect() and ppoll() functions

This commit is contained in:
dongjianli
2018-11-08 07:45:23 -06:00
committed by Gregory Nutt
parent 27c7974cb1
commit 057d555129
10 changed files with 336 additions and 3 deletions
-2
View File
@@ -315,8 +315,6 @@ int nxsig_kill(pid_t pid, int signo);
*
****************************************************************************/
int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
FAR const struct timespec *timeout);
int nxsig_timedwait(FAR const sigset_t *set, FAR struct siginfo *info,
FAR const struct timespec *timeout);
+5
View File
@@ -44,6 +44,7 @@
#include <nuttx/compiler.h>
#include <stdint.h>
#include <signal.h>
#include <semaphore.h>
/****************************************************************************
@@ -153,6 +154,10 @@ extern "C"
int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout);
int ppoll(FAR struct pollfd *fds, nfds_t nfds,
FAR const struct timespec *timeout_ts,
FAR const sigset_t *sigmask);
#undef EXTERN
#if defined(__cplusplus)
}
+5
View File
@@ -43,6 +43,7 @@
#include <nuttx/config.h>
#include <stdint.h>
#include <signal.h>
#include <time.h>
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
@@ -123,6 +124,10 @@ struct timeval;
int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
FAR fd_set *exceptfds, FAR struct timeval *timeout);
int pselect(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
FAR fd_set *exceptfds, FAR const struct timespec *timeout,
FAR const sigset_t *sigmask);
#undef EXTERN
#if defined(__cplusplus)
}
+7 -1
View File
@@ -298,7 +298,13 @@
# ifndef CONFIG_DISABLE_POLL
# define SYS_poll __SYS_poll
# define SYS_select (__SYS_poll + 1)
# define __SYS_ifindex (__SYS_poll + 2)
# ifndef CONFIG_DISABLE_SIGNALS
# define SYS_ppoll (__SYS_poll + 2)
# define SYS_pselect (__SYS_poll + 3)
# define __SYS_ifindex (__SYS_poll + 4)
# else
# define __SYS_ifindex (__SYS_poll + 2)
# endif
# else
# define __SYS_ifindex __SYS_poll
# endif