diff options
author | Freya Murphy <freya@freyacat.org> | 2024-02-03 14:36:26 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-02-03 14:41:52 -0500 |
commit | 8e74123683072deed9ecd29e76037a16a47e3295 (patch) | |
tree | 2a4d6394688ed23b9360ff87c8d9861ab40da01d /include | |
parent | refactor exception panic (diff) | |
download | corn-8e74123683072deed9ecd29e76037a16a47e3295.tar.gz corn-8e74123683072deed9ecd29e76037a16a47e3295.tar.bz2 corn-8e74123683072deed9ecd29e76037a16a47e3295.zip |
alloc on write paging, -O3 compile works, 'volatile' is the story of my life
Diffstat (limited to 'include')
-rw-r--r-- | include/bochs.h | 2 | ||||
-rw-r--r-- | include/lib.h | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/include/bochs.h b/include/bochs.h index 4aa933e..f17b468 100644 --- a/include/bochs.h +++ b/include/bochs.h @@ -8,4 +8,4 @@ * @param width - the width of the screen * @param height - the height of the screen */ -uint32_t *bochs_init(uint16_t w, uint16_t h, uint8_t b); +volatile uint32_t *bochs_init(uint16_t w, uint16_t h, uint8_t b); diff --git a/include/lib.h b/include/lib.h index f60cf5e..7c74fa2 100644 --- a/include/lib.h +++ b/include/lib.h @@ -10,12 +10,18 @@ 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 * that does not overlap src or dest, and the bytes are then copied from the temporary array to dest. @@ -29,6 +35,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. */ |