mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
Kernel: Release the big process lock while yielding in sys$yield()
Otherwise, a thread calling sched_yield() will prevent other threads in that process from entering the kernel.
This commit is contained in:
parent
39e2b69153
commit
73d6a69b3f
3 changed files with 5 additions and 8 deletions
|
@ -267,7 +267,7 @@ public:
|
|||
set_state(Thread::Blocked);
|
||||
|
||||
// Yield to the scheduler, and wait for us to resume unblocked.
|
||||
block_helper();
|
||||
yield_without_holding_big_lock();
|
||||
|
||||
// We should no longer be blocked once we woke up
|
||||
ASSERT(state() != Thread::Blocked);
|
||||
|
@ -380,7 +380,7 @@ private:
|
|||
bool m_dump_backtrace_on_finalization { false };
|
||||
bool m_should_die { false };
|
||||
|
||||
void block_helper();
|
||||
void yield_without_holding_big_lock();
|
||||
};
|
||||
|
||||
HashTable<Thread*>& thread_table();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue