mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
Kernel: Dequeue dying threads from WaitQueue
If a thread is waiting but getting killed, we need to dequeue the thread from the WaitQueue so that a potential wake before finalization doesn't happen.
This commit is contained in:
parent
9495eeb075
commit
41d2a0e9f7
Notes:
sideshowbarker
2024-07-19 04:14:52 +09:00
Author: https://github.com/tomuta
Commit: 41d2a0e9f7
Pull-request: https://github.com/SerenityOS/serenity/pull/3022
4 changed files with 37 additions and 7 deletions
|
@ -38,7 +38,9 @@ public:
|
|||
WaitQueue();
|
||||
~WaitQueue();
|
||||
|
||||
SpinLock<u32>& get_lock() { return m_lock; }
|
||||
bool enqueue(Thread&);
|
||||
bool dequeue(Thread&);
|
||||
void wake_one(Atomic<bool>* lock = nullptr);
|
||||
void wake_n(u32 wake_count);
|
||||
void wake_all();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue