kernel: getpid syscall

This commit is contained in:
Matheus
2023-05-13 22:27:53 -03:00
parent 145df46088
commit 4cc16b8462
3 changed files with 24 additions and 5 deletions
+10
View File
@@ -0,0 +1,10 @@
#include <kernel/syscalls.h>
#include <arch/cpu.h>
syscallret_t syscall_getpid(context_t *ctx) {
syscallret_t ret = {
.ret = _cpu()->thread->proc->pid,
.errno = 0
};
return ret;
}