Add support for adjtime system call

This commit is contained in:
Gregory Nutt 2016-07-10 16:55:32 -06:00
parent c326b6320a
commit f47b69e1f0
6 changed files with 13 additions and 3 deletions

View File

@ -215,7 +215,12 @@
#define SYS_clock_getres (__SYS_clock+1)
#define SYS_clock_gettime (__SYS_clock+2)
#define SYS_clock_settime (__SYS_clock+3)
#define __SYS_timers (__SYS_clock+4)
#ifdef CONFIG_SCHED_TIMEKEEPING
# define SYS_adjtime (__SYS_clock+4)
# define __SYS_timers (__SYS_clock+5)
#else
# define __SYS_timers (__SYS_clock+4)
#endif
/* The following are defined only if POSIX timers are supported */

View File

@ -228,7 +228,7 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz);
****************************************************************************/
#ifdef CONFIG_SCHED_TIMEKEEPING
int adjtime(const struct timeval *delta, struct timeval *olddelta);
int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta);
#endif
#undef EXTERN

View File

@ -199,7 +199,7 @@ errout_in_critical_section:
*
****************************************************************************/
int adjtime(const struct timeval *delta, struct timeval *olddelta)
int adjtime(FAR const struct timeval *delta, FAR struct timeval *olddelta)
{
irqstate_t flags;
long adjust_usec;

View File

@ -1,4 +1,5 @@
"_exit","unistd.h","","void","int"
"adjtime","sys/time.h","defined(CONFIG_SCHED_TIMEKEEPING)","int","FAR const struct timeval *","FAR struct timeval *"
"aio_cancel","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *"
"aio_fsync","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *"
"aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *"

Can't render this file because it has a wrong number of fields in line 2.

View File

@ -152,6 +152,9 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)
#ifdef CONFIG_SCHED_TIMEKEEPING
SYSCALL_LOOKUP(adjtime, 2, STUB_adjtime)
#endif
/* The following are defined only if POSIX timers are supported */

View File

@ -154,6 +154,7 @@ uintptr_t STUB_clock_systimer(int nbr);
uintptr_t STUB_clock_getres(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_clock_gettime(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_clock_settime(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_adjtime(int nbr, uintptr_t parm1, uintptr_t parm2);
/* The following are defined only if POSIX timers are supported */