1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 17:15:08 +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:
Andreas Kling 2021-08-22 17:38:16 +02:00
parent 6c16bedd69
commit b30081b49a
8 changed files with 25 additions and 25 deletions

View file

@ -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();