aboutsummaryrefslogtreecommitdiff
path: root/include/apos
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-09-15 00:37:13 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-09-15 00:37:13 +0300
commit619725a5f2f5272f9cbb547ed95c87312c2765a9 (patch)
tree0df807325009b7b0b6f5dddfd8d07f746678460a /include/apos
parent30055ec1753b5f8cfc2940dba5d4188475fdbf7f (diff)
downloadkmi-619725a5f2f5272f9cbb547ed95c87312c2765a9.tar.gz
kmi-619725a5f2f5272f9cbb547ed95c87312c2765a9.zip
add SYS_TICKS
Diffstat (limited to 'include/apos')
-rw-r--r--include/apos/syscalls.h3
-rw-r--r--include/apos/timer.h1
-rw-r--r--include/apos/uapi.h11
3 files changed, 14 insertions, 1 deletions
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
@@ -312,6 +312,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.
*
* Request timer that triggers a number of ticks in the future.