mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
Kernel: Consolidate the various BlockCondition::unblock variants
The unblock_all variant used to ASSERT if a blocker didn't unblock, but it wasn't clear from the name that it would do that. Because the BlockCondition already asserts that no blockers are left at destruction time, it would still catch blockers that haven't been unblocked for whatever reason. Fixes #4496
This commit is contained in:
@@ -469,7 +469,7 @@ bool Plan9FS::Plan9FSBlockCondition::should_add_blocker(Thread::Blocker& b, void
|
||||
|
||||
void Plan9FS::Plan9FSBlockCondition::unblock_completed(u16 tag)
|
||||
{
|
||||
unblock([&](Thread::Blocker& b, void*) {
|
||||
unblock([&](Thread::Blocker& b, void*, bool&) {
|
||||
ASSERT(b.blocker_type() == Thread::Blocker::Type::Plan9FS);
|
||||
auto& blocker = static_cast<Blocker&>(b);
|
||||
return blocker.unblock(tag);
|
||||
@@ -478,7 +478,7 @@ void Plan9FS::Plan9FSBlockCondition::unblock_completed(u16 tag)
|
||||
|
||||
void Plan9FS::Plan9FSBlockCondition::unblock_all()
|
||||
{
|
||||
BlockCondition::unblock_all([&](Thread::Blocker& b, void*) {
|
||||
unblock([&](Thread::Blocker& b, void*, bool&) {
|
||||
ASSERT(b.blocker_type() == Thread::Blocker::Type::Plan9FS);
|
||||
auto& blocker = static_cast<Blocker&>(b);
|
||||
return blocker.unblock();
|
||||
|
||||
Reference in New Issue
Block a user