scheduler: implement nice

This commit is contained in:
Matheus
2025-08-21 20:46:06 -03:00
parent 3cf396393a
commit dbebef0e03
12 changed files with 89 additions and 32 deletions
+17
View File
@@ -0,0 +1,17 @@
#include <kernel/syscalls.h>
#include <kernel/thread.h>
#include <arch/cpu.h>
syscallret_t syscall_nice(context_t *, int nice) {
syscallret_t ret;
if (nice < 0) {
}
current_thread()->proc->nice = max(min(current_thread()->proc->nice + nice, SCHED_NICE_MAX), SCHED_NICE_MIN);
ret.ret = current_thread()->proc->nice;
return ret;
}