mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
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.
This commit is contained in:
parent
b160677e9e
commit
9cd0f6ffac
Notes:
sideshowbarker
2024-07-19 13:50:50 +09:00
Author: https://github.com/rburchell
Commit: 9cd0f6ffac
Pull-request: https://github.com/SerenityOS/serenity/pull/147
Reviewed-by: https://github.com/alexispurslane
Reviewed-by: https://github.com/awesomekling
8 changed files with 103 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue