mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
Kernel: Allow killing queued threads
We need to dequeue and wake threads that are waiting if the process terminates. Fixes #3603 without the HackStudio fixes in #3606.
This commit is contained in:
parent
8b293119ab
commit
69a9c78783
Notes:
sideshowbarker
2024-07-19 02:12:35 +09:00
Author: https://github.com/tomuta
Commit: 69a9c78783
Pull-request: https://github.com/SerenityOS/serenity/pull/3615
2 changed files with 26 additions and 6 deletions
|
@ -438,12 +438,12 @@ public:
|
|||
// to clean up now while we're still holding m_lock
|
||||
t.was_unblocked();
|
||||
|
||||
if (t.was_interrupted_by_signal())
|
||||
return BlockResult::InterruptedBySignal;
|
||||
|
||||
if (t.was_interrupted_by_death())
|
||||
return BlockResult::InterruptedByDeath;
|
||||
|
||||
if (t.was_interrupted_by_signal())
|
||||
return BlockResult::InterruptedBySignal;
|
||||
|
||||
return BlockResult::WokeNormally;
|
||||
}
|
||||
|
||||
|
@ -634,6 +634,7 @@ private:
|
|||
Blocker* m_blocker { nullptr };
|
||||
timespec* m_blocker_timeout { nullptr };
|
||||
const char* m_wait_reason { nullptr };
|
||||
WaitQueue* m_queue { nullptr };
|
||||
|
||||
Atomic<bool> m_is_active { false };
|
||||
bool m_is_joinable { true };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue