AK: Lock should ASSERT_INTERRUPTS_ENABLED().

Trying to take a Lock while interrupts are disabled is always a bug.
This commit is contained in:
Andreas Kling 2019-02-06 17:27:12 +01:00
commit d0b2949b4d
Notes: sideshowbarker 2024-07-19 15:50:56 +09:00

View file

@ -52,6 +52,7 @@ private:
inline void Lock::lock()
{
ASSERT_INTERRUPTS_ENABLED();
ASSERT(!Scheduler::is_active());
for (;;) {
if (CAS(&m_lock, 1, 0) == 0) {