mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +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:
@@ -478,7 +478,7 @@ void Thread::WaitBlockerSet::disowned_by_waiter(Process& process)
|
||||
for (size_t i = 0; i < m_processes.size();) {
|
||||
auto& info = m_processes[i];
|
||||
if (info.process == &process) {
|
||||
do_unblock([&](Blocker& b, void*, bool&) {
|
||||
unblock_all_blockers_whose_conditions_are_met_locked([&](Blocker& b, void*, bool&) {
|
||||
VERIFY(b.blocker_type() == Blocker::Type::Wait);
|
||||
auto& blocker = static_cast<WaitBlocker&>(b);
|
||||
bool did_unblock = blocker.unblock(info.process, WaitBlocker::UnblockFlags::Disowned, 0, false);
|
||||
@@ -515,7 +515,7 @@ bool Thread::WaitBlockerSet::unblock(Process& process, WaitBlocker::UnblockFlags
|
||||
}
|
||||
}
|
||||
|
||||
do_unblock([&](Blocker& b, void*, bool&) {
|
||||
unblock_all_blockers_whose_conditions_are_met_locked([&](Blocker& b, void*, bool&) {
|
||||
VERIFY(b.blocker_type() == Blocker::Type::Wait);
|
||||
auto& blocker = static_cast<WaitBlocker&>(b);
|
||||
if (was_waited_already && blocker.is_wait())
|
||||
|
||||
Reference in New Issue
Block a user