mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00: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
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