mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 10:46:02 +08:00
Move sleep() and usleep() from sched/ to libc/unistd/. These functions now are simple wrappers for nanosleep(). Remove sleep() and usleep() from system calls; add nanosleep() to system calls
This commit is contained in:
+2
-3
@@ -40,11 +40,12 @@
|
||||
"mq_timedsend","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const char*","size_t","int","const struct timespec*"
|
||||
"mq_unlink","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","const char*"
|
||||
"on_exit","stdlib.h","defined(CONFIG_SCHED_ONEXIT)","int","CODE void (*)(int, FAR void *)","FAR void *"
|
||||
"nanosleep","time.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const struct timespec *", "FAR struct timespec*"
|
||||
"open","fcntl.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","int","..."
|
||||
"opendir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","FAR DIR*","FAR const char*"
|
||||
"pipe","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","int","int [2]|int*"
|
||||
"poll","poll.h","!defined(CONFIG_DISABLE_POLL) && (CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0)","int","FAR struct pollfd*","nfds_t","int"
|
||||
"prctl","sys/prctl.h", "CONFIG_TASK_NAME_SIZE > 0","int","int","..."
|
||||
"prctl","sys/prctl.h", "CONFIG_TASK_NAME_SIZE > 0","int","int","..."
|
||||
"posix_spawnp","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && defined(CONFIG_BINFMT_EXEPATH)","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 []"
|
||||
"posix_spawn","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS) && !defined(CONFIG_BINFMT_EXEPATH)","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 []"
|
||||
"pthread_barrier_destroy","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","FAR pthread_barrier_t*"
|
||||
@@ -118,7 +119,6 @@
|
||||
"sigsuspend","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const sigset_t*"
|
||||
"sigtimedwait","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const sigset_t*","FAR struct siginfo*","FAR const struct timespec*"
|
||||
"sigwaitinfo","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR const sigset_t*","FAR struct siginfo*"
|
||||
"sleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","unsigned int","unsigned int"
|
||||
"socket","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int","int"
|
||||
"stat","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","FAR struct stat*"
|
||||
#"statfs","stdio.h","","int","FAR const char*","FAR struct statfs*"
|
||||
@@ -138,7 +138,6 @@
|
||||
"unsetenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","const char*"
|
||||
"up_assert","assert.h","","void","FAR const uint8_t*","int"
|
||||
#"up_assert","assert.h","","void"
|
||||
"usleep","unistd.h","!defined(CONFIG_DISABLE_SIGNALS)","int","useconds_t"
|
||||
"vfork","unistd.h","defined(CONFIG_ARCH_HAVE_VFORK)","pid_t"
|
||||
"wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","int*"
|
||||
"waitid","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","int","idtype_t","id_t"," FAR siginfo_t *","int"
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 47 and column 68.
|
@@ -118,8 +118,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
||||
SYSCALL_LOOKUP(sigsuspend, 1, STUB_sigsuspend)
|
||||
SYSCALL_LOOKUP(sigtimedwait, 3, STUB_sigtimedwait)
|
||||
SYSCALL_LOOKUP(sigwaitinfo, 2, STUB_sigwaitinfo)
|
||||
SYSCALL_LOOKUP(sleep, 1, STUB_sleep)
|
||||
SYSCALL_LOOKUP(usleep, 1, STUB_usleep)
|
||||
SYSCALL_LOOKUP(nanosleep, 2, STUB_nanosleep)
|
||||
#endif
|
||||
|
||||
/* The following are only defined if the system clock is enabled in the
|
||||
@@ -148,7 +147,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
||||
* enabled.
|
||||
*/
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
SYSCALL_LOOKUP(close, 1, STUB_close)
|
||||
SYSCALL_LOOKUP(ioctl, 3, STUB_ioctl)
|
||||
SYSCALL_LOOKUP(read, 3, STUB_read)
|
||||
|
||||
@@ -132,8 +132,7 @@ uintptr_t STUB_sigsuspend(int nbr, uintptr_t parm1);
|
||||
uintptr_t STUB_sigtimedwait(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||
uintptr_t parm3);
|
||||
uintptr_t STUB_sigwaitinfo(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
uintptr_t STUB_sleep(int nbr, uintptr_t parm1);
|
||||
uintptr_t STUB_usleep(int nbr, uintptr_t parm1);
|
||||
uintptr_t STUB_nanosleep(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
|
||||
/* The following are only defined if the system clock is enabled in the
|
||||
* NuttX configuration.
|
||||
|
||||
Reference in New Issue
Block a user