aboutsummaryrefslogtreecommitdiff
path: root/libc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inc')
-rw-r--r--libc/inc/random.h12
-rw-r--r--libc/inc/sys.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/libc/inc/random.h b/libc/inc/random.h
new file mode 100644
index 0000000..50c849b
--- /dev/null
+++ b/libc/inc/random.h
@@ -0,0 +1,12 @@
+// MIT License, Copyright (c) 2020 Marvin Borner
+
+#ifndef RANDOM_H
+#define RANDOM_H
+
+#include <def.h>
+
+void srand(u32 seed);
+u32 rand();
+char *randstr(u32 size);
+
+#endif
diff --git a/libc/inc/sys.h b/libc/inc/sys.h
index 2014da9..bb5dec2 100644
--- a/libc/inc/sys.h
+++ b/libc/inc/sys.h
@@ -12,6 +12,7 @@ enum sys {
SYS_WRITE,
SYS_EXEC,
SYS_EXIT,
+ SYS_TIME,
SYS_MAP,
SYS_UNMAP,
SYS_RESOLVE
@@ -42,6 +43,7 @@ int sysv(enum sys num, ...);
while (1) { \
} \
}
+#define time() sys0(SYS_TIME)
#define event_map(id, func) sys2(SYS_MAP, (int)id, (int)func)
#define event_unmap(id, func) sys2(SYS_UNMAP, (int)id, (int)func)
#define event_resolve() sys0(SYS_RESOLVE) // TODO: Find method making event_resolve obsolete