From 619725a5f2f5272f9cbb547ed95c87312c2765a9 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 15 Sep 2022 00:37:13 +0300 Subject: add SYS_TICKS --- include/apos/syscalls.h | 3 +++ include/apos/timer.h | 1 - include/apos/uapi.h | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/apos/syscalls.h b/include/apos/syscalls.h index 84d9e07..4bbcdc5 100644 --- a/include/apos/syscalls.h +++ b/include/apos/syscalls.h @@ -53,6 +53,9 @@ enum { /** Get accuracy of clock in Hertz. */ SYS_TIMEBASE, + /** Get current ticks. */ + SYS_TICKS, + /** Request relative timer (number of ticks from now). */ SYS_REQ_REL_TIMER, diff --git a/include/apos/timer.h b/include/apos/timer.h index 7a5d73d..6f83d23 100644 --- a/include/apos/timer.h +++ b/include/apos/timer.h @@ -22,7 +22,6 @@ */ typedef uint64_t ticks_t; - /** * tunit_t typedef, whichever time unit we're dealing with. */ diff --git a/include/apos/uapi.h b/include/apos/uapi.h index 1ebdc21..29e15dc 100644 --- a/include/apos/uapi.h +++ b/include/apos/uapi.h @@ -311,6 +311,17 @@ SYSCALL_DECLARE1(free_mem, start); */ SYSCALL_DECLARE0(timebase); +/** + * Get current ticks. + * + * @param a Unused. + * @param b Unused. + * @param c Unused. + * @param d Unused. + * @return Current ticks. + */ +SYSCALL_DECLARE0(ticks); + /** * Request relative timer syscall. * -- cgit v1.3