mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
Kernel: Add a basic thread boosting mechanism
This patch introduces a syscall: int set_thread_boost(int tid, int amount) You can use this to add a permanent boost value to the effective thread priority of any thread with your UID (or any thread in the system if you are the superuser.) This is quite crude, but opens up some interesting opportunities. :^)
This commit is contained in:
parent
50677bf806
commit
610f3ad12f
7 changed files with 46 additions and 2 deletions
|
@ -28,6 +28,13 @@ int profiling_disable(pid_t pid)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int set_thread_boost(int tid, int amount)
|
||||
{
|
||||
int rc = syscall(SC_set_thread_boost, tid, amount);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
|
||||
int futex(int32_t* userspace_address, int futex_op, int32_t value, const struct timespec* timeout)
|
||||
{
|
||||
Syscall::SC_futex_params params { userspace_address, futex_op, value, timeout };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue