mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 15:54:58 +00:00
Kernel: Rename Thread::BlockCondition to BlockerSet
This class represents a set of Thread::Blocker objects attached to something that those blockers are waiting on.
This commit is contained in:
parent
05e1b196e9
commit
85546af417
15 changed files with 83 additions and 86 deletions
|
@ -442,14 +442,14 @@ bool Plan9FS::Blocker::is_completed() const
|
|||
return m_completion->completed;
|
||||
}
|
||||
|
||||
bool Plan9FS::Plan9FSBlockCondition::should_add_blocker(Thread::Blocker& b, void*)
|
||||
bool Plan9FS::Plan9FSBlockerSet::should_add_blocker(Thread::Blocker& b, void*)
|
||||
{
|
||||
// NOTE: m_lock is held already!
|
||||
auto& blocker = static_cast<Blocker&>(b);
|
||||
return !blocker.is_completed();
|
||||
}
|
||||
|
||||
void Plan9FS::Plan9FSBlockCondition::unblock_completed(u16 tag)
|
||||
void Plan9FS::Plan9FSBlockerSet::unblock_completed(u16 tag)
|
||||
{
|
||||
unblock([&](Thread::Blocker& b, void*, bool&) {
|
||||
VERIFY(b.blocker_type() == Thread::Blocker::Type::Plan9FS);
|
||||
|
@ -458,7 +458,7 @@ void Plan9FS::Plan9FSBlockCondition::unblock_completed(u16 tag)
|
|||
});
|
||||
}
|
||||
|
||||
void Plan9FS::Plan9FSBlockCondition::unblock_all()
|
||||
void Plan9FS::Plan9FSBlockerSet::unblock_all()
|
||||
{
|
||||
unblock([&](Thread::Blocker& b, void*, bool&) {
|
||||
VERIFY(b.blocker_type() == Thread::Blocker::Type::Plan9FS);
|
||||
|
@ -467,7 +467,7 @@ void Plan9FS::Plan9FSBlockCondition::unblock_all()
|
|||
});
|
||||
}
|
||||
|
||||
void Plan9FS::Plan9FSBlockCondition::try_unblock(Plan9FS::Blocker& blocker)
|
||||
void Plan9FS::Plan9FSBlockerSet::try_unblock(Plan9FS::Blocker& blocker)
|
||||
{
|
||||
if (m_fs.is_complete(*blocker.completion())) {
|
||||
SpinlockLocker lock(m_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue