mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
sched/signal and syscall/: Add support for pselect() and ppoll() functions
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user