summaryrefslogtreecommitdiff
path: root/sys/lib/string
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-10-11 16:43:56 -0400
committersigsegv7 <ian@vegaa.systems>2023-10-11 16:43:56 -0400
commit46f72c5c930419aa57aca0d8480d1ccc9131d590 (patch)
treecd74fca2d7bc27fce94c9c04acc3091cecbbf3ff /sys/lib/string
parentac11bed4498cccc1f48d3bf58ab4a9a311cbb998 (diff)
kernel: lib: Add memset64()
Signed-off-by: sigsegv7 <ian@vegaa.systems>
Diffstat (limited to 'sys/lib/string')
-rw-r--r--sys/lib/string/memset.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/lib/string/memset.c b/sys/lib/string/memset.c
index f8f3c9c..df0672c 100644
--- a/sys/lib/string/memset.c
+++ b/sys/lib/string/memset.c
@@ -38,3 +38,13 @@ memset(void *s, int c, size_t n)
return s;
}
+
+void *
+memset64(void *s, int c, size_t n)
+{
+ for (size_t i = 0; i < n; ++i) {
+ ((uint32_t *)s)[i] = c;
+ }
+
+ return s;
+}