aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/lib')
-rw-r--r--src/kernel/lib/lib.h6
-rw-r--r--src/kernel/lib/memory.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/lib/lib.h b/src/kernel/lib/lib.h
index de09e0f..420dd5b 100644
--- a/src/kernel/lib/lib.h
+++ b/src/kernel/lib/lib.h
@@ -39,7 +39,7 @@ void strcpy(char *dest, const char *src);
* @param count The number of bytes to be copied (src)
* @return The modified dest pointer
*/
-void *memory_copy(void *dest, const void *src, size_t count);
+void *memcpy(void *dest, const void *src, size_t count);
/**
* Replace n bytes of dest by val
@@ -48,7 +48,7 @@ void *memory_copy(void *dest, const void *src, size_t count);
* @param count The number of times val should replace dest entry
* @return The modified dest pointer
*/
-void *memory_set(void *dest, char val, size_t count);
+void *memset(void *dest, char val, size_t count);
/**
* Compare the first n bytes of a and b
@@ -57,6 +57,6 @@ void *memory_set(void *dest, char val, size_t count);
* @param size The number of bytes to be compared
* @return -1 if a < b, 0 if a = b and 1 if a > b
*/
-int memory_compare(const void *a_ptr, const void *b_ptr, size_t size);
+int memcmp(const void *a_ptr, const void *b_ptr, size_t size);
#endif
diff --git a/src/kernel/lib/memory.c b/src/kernel/lib/memory.c
index 6ec4ed9..a030c9a 100644
--- a/src/kernel/lib/memory.c
+++ b/src/kernel/lib/memory.c
@@ -1,19 +1,19 @@
#include <stddef.h>
-void *memory_copy(void *dest, const void *src, size_t count) {
+void *memcpy(void *dest, const void *src, size_t count) {
const char *sp = (const char *) src;
char *dp = (char *) dest;
for (; count != 0; count--) *dp++ = *sp++;
return dest;
}
-void *memory_set(void *dest, char val, size_t count) {
+void *memset(void *dest, char val, size_t count) {
char *temp = (char *) dest;
for (; count != 0; count--) *temp++ = val;
return dest;
}
-int memory_compare(const void *a_ptr, const void *b_ptr, size_t size) {
+int memcmp(const void *a_ptr, const void *b_ptr, size_t size) {
const unsigned char *a = (const unsigned char *) a_ptr;
const unsigned char *b = (const unsigned char *) b_ptr;
for (size_t i = 0; i < size; i++) {