summaryrefslogtreecommitdiff
path: root/Kernel/WaitQueue.h
AgeCommit message (Collapse)Author
2019-12-22Kernel: Use IntrusiveList to make WaitQueue allocation-free :^)Andreas Kling
2019-12-01Kernel: Add a WaitQueue for Thread queueing/waking and use it for LockAndreas Kling
The kernel's Lock class now uses a proper wait queue internally instead of just having everyone wake up regularly to try to acquire the lock. We also keep the donation mechanism, so that whenever someone tries to take the lock and fails, that thread donates the remainder of its timeslice to the current lock holder. After unlocking a Lock, the unlocking thread calls WaitQueue::wake_one, which unblocks the next thread in queue.