feat(memory, string): add memory and string utilities

This commit is contained in:
2026-01-26 15:22:46 +01:00
parent b9b8d1147c
commit 090e97e3e1
6 changed files with 84 additions and 16 deletions

10
include/memory.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef RIVOS_MEMORY_H
#define RIVOS_MEMORY_H
#include "types.h"
void *kmemset(void *buf, char c, size_t n);
void *kmemcpy(void *dst, const void *src, size_t n);
#endif

15
include/string.h Normal file
View File

@@ -0,0 +1,15 @@
#ifndef RIVOS_STRING_H
#define RIVOS_STRING_H
#include "types.h"
/**
* This is not a safe function, check dst size
*/
char *kstrcpy(char *dst, const char *src);
size_t kstrlen(const char *str);
int kstrcmp(const char *s1, const char *s2);
#endif