aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/std/memcpy.c
diff options
context:
space:
mode:
authorEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2023-06-15 22:36:39 -0400
committerEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2023-06-15 22:36:39 -0400
commita78033acc941fc4bcf6188f1d48fd8e012673fff (patch)
treeac92adae5e40274fd9e0b78352a24840cc88eab4 /kernel/std/memcpy.c
initial commit
Diffstat (limited to 'kernel/std/memcpy.c')
-rw-r--r--kernel/std/memcpy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/std/memcpy.c b/kernel/std/memcpy.c
new file mode 100644
index 0000000..7e09be7
--- /dev/null
+++ b/kernel/std/memcpy.c
@@ -0,0 +1,9 @@
+#include <string.h>
+
+void* memcpy(void* restrict dstptr, const void* restrict srcptr, size_t size) {
+ unsigned char* dst = (unsigned char*) dstptr;
+ const unsigned char* src = (const unsigned char*) srcptr;
+ for (size_t i=0; i < size; i++)
+ dst[i] = src[i];
+ return dstptr;
+} \ No newline at end of file