summaryrefslogtreecommitdiff
path: root/kernel/util.c
diff options
context:
space:
mode:
authordzwdz2021-06-25 16:22:43 +0200
committerdzwdz2021-06-25 16:22:43 +0200
commitf60d40f3bf4dfe8ed6f63a27367d323319a4ef97 (patch)
tree1cde54eb600106d0d1fc11927f55d5a03eb2b4aa /kernel/util.c
parent376325d08388d9103ca2f57aceb60c4a507a42aa (diff)
ring3
Diffstat (limited to 'kernel/util.c')
-rw-r--r--kernel/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/util.c b/kernel/util.c
new file mode 100644
index 0000000..da3ac9d
--- /dev/null
+++ b/kernel/util.c
@@ -0,0 +1,9 @@
+#include <kernel/util.h>
+#include <stdint.h>
+
+void *memset(void *s, int c, size_t n) {
+ uint8_t *s2 = s;
+ for (size_t i = 0; i < n; n++)
+ s2[i] = c;
+ return s;
+}