1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:47:35 +00:00

Kernel: Use a WaitQueue in PATAChannel

Instead of waking up repeatedly to check if a disk operation has
finished, use a WaitQueue and wake it up in the IRQ handler.

This simplifies the device driver a bit, and makes it more responsive
as well :^)
This commit is contained in:
Andreas Kling 2019-12-01 12:47:53 +01:00
parent 9ed272ce98
commit 8b129476b1
3 changed files with 17 additions and 40 deletions

View file

@ -322,6 +322,11 @@ public:
return block<ConditionBlocker>(state_string, move(condition));
}
void wait_on(WaitQueue& queue)
{
(void)block<WaitQueueBlocker>(queue);
}
void unblock();
// Tell this thread to unblock if needed,