1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +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:
Tom 2020-12-22 11:17:56 -07:00 committed by Andreas Kling
parent 94e4aa94b5
commit 49a76164c8
6 changed files with 16 additions and 57 deletions

View file

@ -77,7 +77,7 @@ class ARPTableBlockCondition : public Thread::BlockCondition {
public:
void unblock(const IPv4Address& ip_addr, const MACAddress& addr)
{
unblock_all([&](auto& b, void*) {
BlockCondition::unblock([&](auto& b, void*, bool&) {
ASSERT(b.blocker_type() == Thread::Blocker::Type::Routing);
auto& blocker = static_cast<ARPTableBlocker&>(b);
return blocker.unblock(false, ip_addr, addr);