summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/32/util.c
diff options
context:
space:
mode:
authordzwdz2022-07-17 14:39:45 +0200
committerdzwdz2022-07-17 14:39:45 +0200
commit51cbabd0f40b041fa00203266afa046d14e88b22 (patch)
tree75022bc959b32e72876dfe3449faecac6feb5caa /src/kernel/arch/amd64/32/util.c
parent4c10db944ca18c8001848c7e4e8ef51876bbe094 (diff)
amd64: remove dead code, combine shared code
Diffstat (limited to 'src/kernel/arch/amd64/32/util.c')
-rw-r--r--src/kernel/arch/amd64/32/util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/arch/amd64/32/util.c b/src/kernel/arch/amd64/32/util.c
new file mode 100644
index 0000000..7915168
--- /dev/null
+++ b/src/kernel/arch/amd64/32/util.c
@@ -0,0 +1,8 @@
+#include <kernel/arch/amd64/32/util.h>
+
+void *memset32(void *s, int c, size_t n) {
+ unsigned char *s2 = s;
+ for (size_t i = 0; i < n; i++)
+ s2[i] = c;
+ return s;
+}