Move string functions/utils from HAL to std/string

This commit is contained in:
2025-11-11 19:54:09 +01:00
parent f5dae4984d
commit 344952fb5f
27 changed files with 200 additions and 228 deletions

View File

@ -11,6 +11,7 @@
#include "bootinfo/bootinfo.h"
#include "dlmalloc/malloc.h"
#include "kprintf.h"
#include "std/string.h"
int32_t SYSCALL5(sys_mman_map, addr1, size1, prot1, flags1, out1) {
uint8_t *addr = (uint8_t *)addr1;
@ -28,7 +29,7 @@ int32_t SYSCALL5(sys_mman_map, addr1, size1, prot1, flags1, out1) {
size_t pages = _DIV_ROUNDUP(size, HAL_PAGE_SIZE);
uint8_t *phys = (uint8_t *)pmm_alloc(pages);
hal_memset(VIRT(phys), 0, pages * HAL_PAGE_SIZE);
memset(VIRT(phys), 0, pages * HAL_PAGE_SIZE);
spinlock_acquire(&PROCS.spinlock);
Proc *proc = NULL;