diff options
Diffstat (limited to 'kernel/util.c')
-rw-r--r-- | kernel/util.c | 9 |
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; +} |