1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

Kernel: Convert BlockedSignal and BlockedLurking to the new Blocker mechanism

The last two of the old block states gone :)
This commit is contained in:
Robin Burchell 2019-07-19 09:34:11 +02:00 committed by Andreas Kling
parent 750dbe986d
commit d2ca91c024
5 changed files with 31 additions and 17 deletions

View file

@ -65,8 +65,6 @@ public:
Stopped,
__Begin_Blocked_States__,
BlockedLurking,
BlockedSignal,
BlockedCondition,
__End_Blocked_States__
};
@ -158,6 +156,20 @@ public:
pid_t& m_waitee_pid;
};
class SemiPermanentBlocker : public Blocker {
public:
enum class Reason {
Lurking,
Signal,
};
SemiPermanentBlocker(Reason reason);
virtual bool should_unblock(Thread&, time_t, long) override;
private:
Reason m_reason;
};
void did_schedule() { ++m_times_scheduled; }
u32 times_scheduled() const { return m_times_scheduled; }