1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

Kernel: Don't register thread as custom data for WaitQueueBlocker

When adding a WaitQueueBlocker to a WaitQueue, it stored the blocked
thread in the registration's custom "void* data" slot.
This was only used to print the Thread* in some debug logging.

Now that Blocker always knows its origin Thread, we can simply add
a Blocker::thread() accessor and then get the blocked Thread& from
there. No need to register custom data.
This commit is contained in:
Andreas Kling 2021-08-24 01:07:16 +02:00
parent a58c4bbcf5
commit 2c74533ba6
4 changed files with 13 additions and 15 deletions

View file

@ -301,6 +301,8 @@ public:
virtual const BlockTimeout& override_timeout(const BlockTimeout& timeout) { return timeout; }
virtual bool can_be_interrupted() const { return true; }
Thread& thread() { return m_thread; }
enum class UnblockImmediatelyReason {
UnblockConditionAlreadyMet,
TimeoutInThePast,