mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
Kernel: Enhance WaitQueue to remember pending wakes
If WaitQueue::wake_all, WaitQueue::wake_one, or WaitQueue::wake_n is called but nobody is currently waiting, we should remember that fact and prevent someone from waiting after such a request. This solves a race condition where the Finalizer thread is notified to finalize a thread, but it is not (yet) waiting on this queue. Fixes #2693
This commit is contained in:
parent
2a82a25fec
commit
9725bda63e
Notes:
sideshowbarker
2024-07-19 05:07:28 +09:00
Author: https://github.com/tomuta
Commit: 9725bda63e
Pull-request: https://github.com/SerenityOS/serenity/pull/2706
Reviewed-by: https://github.com/awesomekling
5 changed files with 93 additions and 27 deletions
|
@ -301,6 +301,7 @@ public:
|
|||
|
||||
enum class BlockResult {
|
||||
WokeNormally,
|
||||
NotBlocked,
|
||||
InterruptedBySignal,
|
||||
InterruptedByDeath,
|
||||
InterruptedByTimeout,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue