Update to use 64-bit timer when available

This commit is contained in:
Gregory Nutt
2016-01-21 11:54:26 -06:00
parent cb7bbdfed4
commit f348e68069
41 changed files with 182 additions and 165 deletions
+2 -1
View File
@@ -11,7 +11,8 @@
"clock_getres","time.h","","int","clockid_t","struct timespec*"
"clock_gettime","time.h","","int","clockid_t","struct timespec*"
"clock_settime","time.h","","int","clockid_t","const struct timespec*"
"clock_systimer","nuttx/clock.h","!defined(__HAVE_KERNEL_GLOBALS)","uint32_t"
"clock_systimer32","nuttx/clock.h","!defined(__HAVE_KERNEL_GLOBALS) && !defined(CONFIG_SYSTEM_TIME64)","uint32_t"
"clock_systimer64","nuttx/clock.h","!defined(__HAVE_KERNEL_GLOBALS) && defined(CONFIG_SYSTEM_TIME64)","uint64_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"
1 _exit unistd.h void int
11 clock_getres time.h int clockid_t
12 clock_gettime time.h int clockid_t
13 clock_settime time.h int clockid_t
14 clock_systimer clock_systimer32 nuttx/clock.h !defined(__HAVE_KERNEL_GLOBALS) !defined(__HAVE_KERNEL_GLOBALS) && !defined(CONFIG_SYSTEM_TIME64) uint32_t
15 clock_systimer64 nuttx/clock.h !defined(__HAVE_KERNEL_GLOBALS) && defined(CONFIG_SYSTEM_TIME64) uint64_t
16 close unistd.h CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 int int
17 closedir dirent.h CONFIG_NFILE_DESCRIPTORS > 0 int FAR DIR*
18 connect sys/socket.h CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET) int int
+10 -3
View File
@@ -60,7 +60,7 @@
****************************************************************************/
/****************************************************************************
* Name: syscall_clock_systimer
* Name: syscall_clock_systimer32/64
*
* Description:
* In the kernel build, proxying for clock_systimer() must be handled
@@ -74,7 +74,14 @@
*
****************************************************************************/
uint32_t syscall_clock_systimer(void)
#ifdef CONFIG_SYSTEM_TIME64
uint64_t syscall_clock_systimer64(void)
{
return clock_systimer();
return clock_systimer64();
}
#else
uint32_t syscall_clock_systimer32(void)
{
return clock_systimer32();
}
#endif
+5 -1
View File
@@ -99,7 +99,11 @@
* have an address that can be included in the g_funclookup[] table.
*/
uint32_t syscall_clock_systimer(void);
#ifdef CONFIG_SYSTEM_TIME64
uint64_t syscall_clock_systimer64(void);
#else
uint32_t syscall_clock_systimer32(void);
#endif
/****************************************************************************
* Pre-processor Definitions
+5 -1
View File
@@ -148,7 +148,11 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
* NuttX configuration.
*/
SYSCALL_LOOKUP(syscall_clock_systimer, 0, STUB_clock_systimer)
#ifdef CONFIG_SYSTEM_TIME64
SYSCALL_LOOKUP(syscall_clock_systimer64, 0, STUB_clock_systimer64)
#endif
SYSCALL_LOOKUP(syscall_clock_systimer32, 0, STUB_clock_systimer32)
#endif
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)