mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
Add support for adjtime system call
This commit is contained in:
@@ -215,7 +215,12 @@
|
|||||||
#define SYS_clock_getres (__SYS_clock+1)
|
#define SYS_clock_getres (__SYS_clock+1)
|
||||||
#define SYS_clock_gettime (__SYS_clock+2)
|
#define SYS_clock_gettime (__SYS_clock+2)
|
||||||
#define SYS_clock_settime (__SYS_clock+3)
|
#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 */
|
/* The following are defined only if POSIX timers are supported */
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -228,7 +228,7 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz);
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_TIMEKEEPING
|
#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
|
#endif
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
|
|||||||
@@ -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;
|
irqstate_t flags;
|
||||||
long adjust_usec;
|
long adjust_usec;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
"_exit","unistd.h","","void","int"
|
"_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_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_fsync","aio.h","defined(CONFIG_FS_AIO)","int","int","FAR struct aiocb *"
|
||||||
"aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *"
|
"aio_read","aio.h","defined(CONFIG_FS_AIO)","int","FAR struct aiocb *"
|
||||||
|
|||||||
|
@@ -152,6 +152,9 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
|||||||
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
|
SYSCALL_LOOKUP(clock_getres, 2, STUB_clock_getres)
|
||||||
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
|
SYSCALL_LOOKUP(clock_gettime, 2, STUB_clock_gettime)
|
||||||
SYSCALL_LOOKUP(clock_settime, 2, STUB_clock_settime)
|
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 */
|
/* The following are defined only if POSIX timers are supported */
|
||||||
|
|
||||||
|
|||||||
@@ -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_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_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_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 */
|
/* The following are defined only if POSIX timers are supported */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user