Explorar o código

AK: Lock should ASSERT_INTERRUPTS_ENABLED().

Trying to take a Lock while interrupts are disabled is always a bug.
Andreas Kling %!s(int64=6) %!d(string=hai) anos
pai
achega
d0b2949b4d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      AK/Lock.h

+ 1 - 0
AK/Lock.h

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