diff options
author | Robin Burchell <robin+git@viroteck.net> | 2019-05-29 23:20:51 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-30 02:57:15 +0200 |
commit | 9cd0f6ffac0e22185455b884a9fcf0f810ac6da6 (patch) | |
tree | fb79a0609975ab93a9b7c719f1c61622a9b2cd15 /Kernel/Syscall.cpp | |
parent | b160677e9e766b50a89210b6b645a8ba1cd1b7bd (diff) | |
download | serenity-9cd0f6ffac0e22185455b884a9fcf0f810ac6da6.zip |
Kernel/LibC: Implement sched_* functionality to set/get process priority
Right now, we allow anything inside a user to raise or lower any other process's
priority. This feels simple enough to me. Linux disallows raising, but
that's annoying in practice.
Diffstat (limited to 'Kernel/Syscall.cpp')
-rw-r--r-- | Kernel/Syscall.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index 94b8ea6c97..49ade71a3c 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -276,6 +276,10 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2, return current->process().sys$getsockname((int)arg1, (sockaddr*)arg2, (socklen_t*)arg3); case Syscall::SC_getpeername: return current->process().sys$getpeername((int)arg1, (sockaddr*)arg2, (socklen_t*)arg3); + case Syscall::SC_sched_setparam: + return current->process().sys$sched_setparam((pid_t)arg1, (struct sched_param*)arg2); + case Syscall::SC_sched_getparam: + return current->process().sys$sched_setparam((pid_t)arg1, (struct sched_param*)arg2); default: kprintf("<%u> int0x82: Unknown function %u requested {%x, %x, %x}\n", current->process().pid(), function, arg1, arg2, arg3); return -ENOSYS; |