1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 22:14:58 +00:00

Kernel: Rename Blocker::not_blocking(bool) to something more descriptive

Namely, will_unblock_immediately_without_blocking(Reason).

This virtual function is called on a blocker *before any block occurs*,
if it turns out that we don't need to block the thread after all.

This can happens for one of two reasons:

- UnblockImmediatelyReason::UnblockConditionAlreadyMet

    We don't need to block the thread because the condition for
    unblocking it is already met.

- UnblockImmediatelyReason::TimeoutInThePast

    We don't need to block the thread because a timeout was specified
    and that timeout is already in the past.

This patch does not introduce any behavior changes, it's only meant to
clarify this part of the blocking logic.
This commit is contained in:
Andreas Kling 2021-08-23 02:09:08 +02:00
parent 39474830a9
commit 7006cb82bd
5 changed files with 35 additions and 30 deletions

View file

@ -425,7 +425,7 @@ bool Plan9FS::Blocker::unblock(u16 tag)
return unblock();
}
void Plan9FS::Blocker::not_blocking(bool)
void Plan9FS::Blocker::will_unblock_immediately_without_blocking(UnblockImmediatelyReason)
{
{
SpinlockLocker lock(m_lock);