diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-09 10:24:41 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-09 10:24:41 -0400 |
| commit | cc23ea5a4b38807e79aceb23e6f43e965926618f (patch) | |
| tree | 90142bb44186f4dad7bbd82d3d53655b835c822b /sys/syscall_pcb.c | |
| parent | 434ddcd907832b1febc7d70e4faa52109c7eb3bd (diff) | |
| download | jove-kernel-cc23ea5a4b38807e79aceb23e6f43e965926618f.tar.gz jove-kernel-cc23ea5a4b38807e79aceb23e6f43e965926618f.tar.bz2 jove-kernel-cc23ea5a4b38807e79aceb23e6f43e965926618f.zip | |
add basic scheduler logic. rename init rootdir indexes
Diffstat (limited to 'sys/syscall_pcb.c')
| -rw-r--r-- | sys/syscall_pcb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/syscall_pcb.c b/sys/syscall_pcb.c index b77be95..a37e4bb 100644 --- a/sys/syscall_pcb.c +++ b/sys/syscall_pcb.c @@ -1,14 +1,21 @@ #include "api/error.h" +#include "jove.h" #include "lib/printf.h" +#include "proc/process.h" +#include "proc/scheduler.h" #include "syscall.h" +#include "errno.h" int s_syscall_pcb_yield(jove_owned_obj_t *pcb_obj, size_t bytes_left, void *payload_data) { - kprintf("%s: Stub!\n", __func__); - return 0; + size_t bytes_needed = sizeof(pid_t); + CHECK_TOOSMALL(bytes_needed, bytes_left, "Message too small for payload"); + + pid_t subject_pid = *((pid_t*)payload_data); + return scheduler_yield(subject_pid); } int |
