mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 13:48:21 +00:00
kernel: getpid syscall
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user