From f60d40f3bf4dfe8ed6f63a27367d323319a4ef97 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 25 Jun 2021 16:22:43 +0200 Subject: ring3 --- kernel/util.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 kernel/util.c (limited to 'kernel/util.c') 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 +#include + +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; +} -- cgit v1.2.3