summaryrefslogtreecommitdiff
path: root/nuttx/syscall
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-15 14:57:53 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-15 14:57:53 +0000
commitf1893cbaf513c7f0fbca77240fc59707ad039734 (patch)
tree4a5128533aa866afa19719584a764f0f83b9d165 /nuttx/syscall
parentc548df2a3788bfe7527f7fef439d1365cb095e7c (diff)
downloadnuttx-f1893cbaf513c7f0fbca77240fc59707ad039734.tar.gz
nuttx-f1893cbaf513c7f0fbca77240fc59707ad039734.tar.bz2
nuttx-f1893cbaf513c7f0fbca77240fc59707ad039734.zip
Add time and uptime
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3506 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/syscall')
-rw-r--r--nuttx/syscall/stub_lookup.c1
-rw-r--r--nuttx/syscall/stub_lookup.h3
-rw-r--r--nuttx/syscall/syscall.csv1
3 files changed, 5 insertions, 0 deletions
diff --git a/nuttx/syscall/stub_lookup.c b/nuttx/syscall/stub_lookup.c
index 0c4f4451c..d56364bfe 100644
--- a/nuttx/syscall/stub_lookup.c
+++ b/nuttx/syscall/stub_lookup.c
@@ -112,6 +112,7 @@ extern uintptr_t STUB_clock_getres(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_clock_gettime(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_clock_settime(uintptr_t parm1, uintptr_t parm2);
extern uintptr_t STUB_gettimeofday(uintptr_t parm1, uintptr_t parm2);
+extern uintptr_t STUB_clock_uptime(void);
/* The following are defined only if POSIX timers are supported */
diff --git a/nuttx/syscall/stub_lookup.h b/nuttx/syscall/stub_lookup.h
index f9b33938b..16792aefc 100644
--- a/nuttx/syscall/stub_lookup.h
+++ b/nuttx/syscall/stub_lookup.h
@@ -107,6 +107,9 @@ STUB_LOOKUP(3, STUB_up_assert_code) /* SYS_up_assert_code */
STUB_LOOKUP(2, STUB_clock_gettime) /* SYS_clock_gettime */
STUB_LOOKUP(2, STUB_clock_settime) /* SYS_clock_settime */
STUB_LOOKUP(2, STUB_gettimeofday) /* SYS_gettimeofday */
+# ifdef CONFIG_UPTIME
+ STUB_LOOKUP(0, STUB_clock_uptime) /* SYS_clock_uptime */
+# endif
#endif
/* The following are defined only if POSIX timers are supported */
diff --git a/nuttx/syscall/syscall.csv b/nuttx/syscall/syscall.csv
index 2499cd4ab..6998e89b0 100644
--- a/nuttx/syscall/syscall.csv
+++ b/nuttx/syscall/syscall.csv
@@ -6,6 +6,7 @@
"clock_getres","time.h","!defined(CONFIG_DISABLE_CLOCK)","int","clockid_t","struct timespec*"
"clock_gettime","time.h","!defined(CONFIG_DISABLE_CLOCK)","int","clockid_t","struct timespec*"
"clock_settime","time.h","!defined(CONFIG_DISABLE_CLOCK)","int","clockid_t","const struct timespec*"
+"clock_uptime","nuttx/clock.h","!defined(CONFIG_DISABLE_CLOCK) && defined(CONFIG_UPTIME)","time_t"
"close","unistd.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","int","int"
"closedir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR DIR*"
"connect","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","FAR const struct sockaddr*","socklen_t"