mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +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
8 changed files with 103 additions and 1 deletions
|
@ -40,9 +40,11 @@ public:
|
|||
enum Priority
|
||||
{
|
||||
IdlePriority,
|
||||
FirstPriority = IdlePriority,
|
||||
LowPriority,
|
||||
NormalPriority,
|
||||
HighPriority,
|
||||
LastPriority = HighPriority,
|
||||
};
|
||||
|
||||
enum RingLevel
|
||||
|
@ -186,6 +188,8 @@ public:
|
|||
int sys$setsockopt(const Syscall::SC_setsockopt_params*);
|
||||
int sys$getsockname(int sockfd, sockaddr* addr, socklen_t* addrlen);
|
||||
int sys$getpeername(int sockfd, sockaddr* addr, socklen_t* addrlen);
|
||||
int sys$sched_setparam(pid_t pid, const struct sched_param* param);
|
||||
int sys$sched_getparam(pid_t pid, struct sched_param* param);
|
||||
int sys$restore_signal_mask(dword mask);
|
||||
int sys$create_thread(int (*)(void*), void*);
|
||||
void sys$exit_thread(int code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue