From 8e74123683072deed9ecd29e76037a16a47e3295 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 3 Feb 2024 14:36:26 -0500 Subject: alloc on write paging, -O3 compile works, 'volatile' is the story of my life --- include/lib.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'include/lib.h') diff --git a/include/lib.h b/include/lib.h index f60cf5e..7c74fa2 100644 --- a/include/lib.h +++ b/include/lib.h @@ -10,11 +10,17 @@ int memcmp(const void *restrict s1, const void *restrict s2, unsigned long n); /** - * The memcpy() function copies n bytes from memory area src to memory area dest. - * The memory areas must not overlap. + * the memcpy() function copies n bytes from memory area src to memory area dest. + * the memory areas must not overlap. */ void *memcpy(void *restrict dest, const void *restrict src, unsigned long n); +/** + * the memcpy() function copies n bytes from memory area src to memory area dest. + * the memory areas must not overlap. + */ +volatile void *memcpyv(volatile void *dest, const volatile void *src, unsigned long n); + /** * The memmove() function copies n bytes from memory area src to memory area dest. The memory areas * may overlap: copying takes place as though the bytes in src are first copied into a temporary array @@ -28,6 +34,12 @@ void *memmove(void *dest, const void *src, unsigned long n); */ void *memset(void *restrict dest, int c, unsigned long n); +/** + * The memset() function fills the first n bytes of the memory area pointed to by s with the constant + * byte c. + */ +volatile void *memsetv(volatile void *dest, int c, unsigned long n); + /** * The strcmp() function compares the two strings s1 and s2. The locale is not taken into account * (for a locale-aware comparison, see strcoll(3)). The comparison is done using unsigned characters. -- cgit v1.2.3-freya