mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
18 lines
343 B
C
18 lines
343 B
C
#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;
|
|
}
|