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
@@ -67,8 +67,10 @@
"pgalloc", "nuttx/arch.h", "defined(CONFIG_BUILD_KERNEL)", "uintptr_t", "uintptr_t", "unsigned int"
"pipe2","nuttx/drivers/drivers.h","defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0","int","int [2]|int*","size_t"
"poll","poll.h","!defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0)","int","FAR struct pollfd*","nfds_t","int"
"ppoll","poll.h","!defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0)","int","FAR struct pollfd*","nfds_t","FAR const struct timespec *","FAR const sigset_t *"
"prctl","sys/prctl.h", "CONFIG_TASK_NAME_SIZE > 0","int","int","..."
"pread","unistd.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","FAR void*","size_t","off_t"
"pselect","sys/select.h","!defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0)","int","int","FAR fd_set*","FAR fd_set*","FAR fd_set*","FAR const struct timespec *","FAR const sigset_t *"
"pwrite","unistd.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","FAR const void*","size_t","off_t"
"posix_spawnp","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_LIB_ENVPATH)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char *const []|FAR char *const *","FAR char *const []|FAR char *const *"
"posix_spawn","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_LIB_ENVPATH)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char *const []|FAR char *const *","FAR char *const []|FAR char *const *"
1 _exit unistd.h void int
67 pgalloc nuttx/arch.h defined(CONFIG_BUILD_KERNEL) uintptr_t uintptr_t
68 pipe2 nuttx/drivers/drivers.h defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0 int int [2]|int*
69 poll poll.h !defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0) int FAR struct pollfd*
70 ppoll poll.h !defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0) int FAR struct pollfd*
71 prctl sys/prctl.h CONFIG_TASK_NAME_SIZE > 0 int int
72 pread unistd.h CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 ssize_t int
73 pselect sys/select.h !defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0) int int
74 pwrite unistd.h CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 ssize_t int
75 posix_spawnp spawn.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_LIB_ENVPATH) int FAR pid_t *
76 posix_spawn spawn.h !defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_LIB_ENVPATH) int FAR pid_t *
+2
View File
@@ -210,6 +210,8 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
# ifndef CONFIG_DISABLE_POLL
SYSCALL_LOOKUP(poll, 3, STUB_poll)
SYSCALL_LOOKUP(select, 5, STUB_select)
SYSCALL_LOOKUP(ppoll, 4, STUB_ppoll)
SYSCALL_LOOKUP(pselect, 6, STUB_pselect)
# endif
# ifdef CONFIG_NETDEV_IFINDEX
SYSCALL_LOOKUP(if_indextoname, 2, STUB_if_indextoname)
+5
View File
@@ -205,6 +205,11 @@ uintptr_t STUB_poll(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_select(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5);
uintptr_t STUB_ppoll(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4);
uintptr_t STUB_pselect(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5,
uintptr_t parm6);
/* Asynchronous I/O */