mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
Kernel+LibC: Remove sys$donate()
This was an old SerenityOS-specific syscall for donating the remainder of the calling thread's time-slice to another thread within the same process. Now that Threading::Lock uses a pthread_mutex_t internally, we no longer need this syscall, which allows us to get rid of a surprising amount of unnecessary scheduler logic. :^)
This commit is contained in:
parent
c40780d404
commit
565796ae4e
9 changed files with 2 additions and 127 deletions
|
@ -15,20 +15,6 @@ KResultOr<FlatPtr> Process::sys$yield()
|
|||
return 0;
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$donate(pid_t tid)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
if (tid < 0)
|
||||
return EINVAL;
|
||||
|
||||
ScopedCritical critical;
|
||||
auto thread = Thread::from_tid(tid);
|
||||
if (!thread || thread->pid() != pid())
|
||||
return ESRCH;
|
||||
Thread::current()->donate_without_holding_big_lock(thread, "sys$donate");
|
||||
return 0;
|
||||
}
|
||||
|
||||
KResultOr<FlatPtr> Process::sys$sched_setparam(int pid, Userspace<const struct sched_param*> user_param)
|
||||
{
|
||||
REQUIRE_PROMISE(proc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue