summaryrefslogtreecommitdiff
path: root/nuttx/syscall
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-12-13 07:57:13 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-12-13 07:57:13 -0600
commitf7845a920d6e267e5efca40b3edf5474b1f60a24 (patch)
tree302291292c9f89547836920fa6538c2ef1e5adac /nuttx/syscall
parent599e2d697b461695f74e595b439c0107c4dc112d (diff)
downloadnuttx-f7845a920d6e267e5efca40b3edf5474b1f60a24.tar.gz
nuttx-f7845a920d6e267e5efca40b3edf5474b1f60a24.tar.bz2
nuttx-f7845a920d6e267e5efca40b3edf5474b1f60a24.zip
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
Diffstat (limited to 'nuttx/syscall')
-rw-r--r--nuttx/syscall/syscall.csv5
-rw-r--r--nuttx/syscall/syscall_lookup.h5
-rw-r--r--nuttx/syscall/syscall_stublookup.c3
3 files changed, 5 insertions, 8 deletions
diff --git a/nuttx/syscall/syscall.csv b/nuttx/syscall/syscall.csv
index e470b91a7..3ae366a39 100644
--- a/nuttx/syscall/syscall.csv
+++ b/nuttx/syscall/syscall.csv
@@ -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"
diff --git a/nuttx/syscall/syscall_lookup.h b/nuttx/syscall/syscall_lookup.h
index b370bdd5b..7f6da78ab 100644
--- a/nuttx/syscall/syscall_lookup.h
+++ b/nuttx/syscall/syscall_lookup.h
@@ -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)
diff --git a/nuttx/syscall/syscall_stublookup.c b/nuttx/syscall/syscall_stublookup.c
index 65d7a3503..50e302e59 100644
--- a/nuttx/syscall/syscall_stublookup.c
+++ b/nuttx/syscall/syscall_stublookup.c
@@ -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.