From a10aabfcd52f702057316018cd7847ab2bfe4aa1 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Tue, 26 May 2026 21:32:27 +0000 Subject: we're bringing kjarna back and not doing the crazy stuff with trying to have task management during efi. that was a bit extra. --- lib/libc/memmove.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/libc/memmove.c (limited to 'lib/libc/memmove.c') diff --git a/lib/libc/memmove.c b/lib/libc/memmove.c new file mode 100644 index 0000000..fd06bb6 --- /dev/null +++ b/lib/libc/memmove.c @@ -0,0 +1,20 @@ +/* Public domain. */ +#include + +void * +memmove (void *dest, const void *src, size_t len) +{ + char *d = dest; + const char *s = src; + if (d < s) + while (len--) + *d++ = *s++; + else + { + const char *lasts = s + (len-1); + char *lastd = d + (len-1); + while (len--) + *lastd-- = *lasts--; + } + return dest; +} -- cgit v1.3.1-1-g115d