summaryrefslogtreecommitdiff
path: root/src/user/include
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-16 22:26:47 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-16 22:26:47 -0500
commitab4e1cfc8c587e4144d847bbd41307eff03130b2 (patch)
tree4e5502422977c747f3e65633ede26b73d9556ca1 /src/user/include
parent2de07a2abea4081ebab6d80729e5665ba862c74c (diff)
downloadportland-os-ab4e1cfc8c587e4144d847bbd41307eff03130b2.tar.gz
rtc timestamp, knob rand, random terminal color
Diffstat (limited to 'src/user/include')
-rw-r--r--src/user/include/knob/rand.h8
-rw-r--r--src/user/include/pland/syscall.h7
2 files changed, 14 insertions, 1 deletions
diff --git a/src/user/include/knob/rand.h b/src/user/include/knob/rand.h
new file mode 100644
index 0000000..46052e2
--- /dev/null
+++ b/src/user/include/knob/rand.h
@@ -0,0 +1,8 @@
+#ifndef RAND_H
+#define RAND_H
+
+#include <stdint.h>
+
+uint32_t gen_rand();
+
+#endif \ No newline at end of file
diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h
index 6870865..fd0b416 100644
--- a/src/user/include/pland/syscall.h
+++ b/src/user/include/pland/syscall.h
@@ -43,7 +43,8 @@ enum _scn {
_SCN_WAIT_ANY_IPC_SENT,
_SCN_FIND_UNREAD_IPC,
_SCN_WAIT_IPC_READ,
- _SCN_IS_TASK_RUNNING
+ _SCN_IS_TASK_RUNNING,
+ _SCN_GET_TIMESTAMP
};
static inline uint32_t _sc0(enum _scn eax) {
@@ -228,4 +229,8 @@ static inline bool _is_task_running(_task_handle_t handle) {
return (bool)_sc1(_SCN_IS_TASK_RUNNING, handle);
}
+static inline uint32_t _get_timestamp() {
+ return _sc0(_SCN_GET_TIMESTAMP);
+}
+
#endif \ No newline at end of file