mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
Kernel: Rename BlockerSet::unblock() to something more accurate
Namely, unblock_all_blockers_whose_conditions_are_met(). The old name made it sound like things were getting unblocked no matter what, but that's not actually the case. What this actually does is iterate through the set of blockers, unblocking those whose conditions are met. So give it a (very) verbose name that errs on the side of descriptiveness.
This commit is contained in:
@@ -451,7 +451,7 @@ bool Plan9FS::Plan9FSBlockerSet::should_add_blocker(Thread::Blocker& b, void*)
|
||||
|
||||
void Plan9FS::Plan9FSBlockerSet::unblock_completed(u16 tag)
|
||||
{
|
||||
unblock([&](Thread::Blocker& b, void*, bool&) {
|
||||
unblock_all_blockers_whose_conditions_are_met([&](Thread::Blocker& b, void*, bool&) {
|
||||
VERIFY(b.blocker_type() == Thread::Blocker::Type::Plan9FS);
|
||||
auto& blocker = static_cast<Blocker&>(b);
|
||||
return blocker.unblock(tag);
|
||||
@@ -460,7 +460,7 @@ void Plan9FS::Plan9FSBlockerSet::unblock_completed(u16 tag)
|
||||
|
||||
void Plan9FS::Plan9FSBlockerSet::unblock_all()
|
||||
{
|
||||
unblock([&](Thread::Blocker& b, void*, bool&) {
|
||||
unblock_all_blockers_whose_conditions_are_met([&](Thread::Blocker& b, void*, bool&) {
|
||||
VERIFY(b.blocker_type() == Thread::Blocker::Type::Plan9FS);
|
||||
auto& blocker = static_cast<Blocker&>(b);
|
||||
return blocker.unblock();
|
||||
|
||||
Reference in New Issue
Block a user