syscalls: getcpu

This commit is contained in:
Matheus
2025-09-12 23:03:30 -03:00
parent ad4f5ff8cf
commit a599c7f95e
4 changed files with 34 additions and 20 deletions
+14
View File
@@ -0,0 +1,14 @@
#include <kernel/syscalls.h>
#include <arch/cpu.h>
syscallret_t syscall_getcpu(context_t *) {
syscallret_t ret = {
.errno = 0
};
uint32_t cpu_id = current_cpu_internal_id();
ret.ret = cpu_id;
return ret;
}