diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-06 17:27:12 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-06 17:34:24 +0100 |
commit | d0b2949b4d249f7d6f0db652e2f893c1fff42e33 (patch) | |
tree | ef77e44b5566eccb4dfad043e4bcbd85236b371f | |
parent | a1b63bb6d4b7231c3e148efcd20a47a015420b90 (diff) | |
download | serenity-d0b2949b4d249f7d6f0db652e2f893c1fff42e33.zip |
AK: Lock should ASSERT_INTERRUPTS_ENABLED().
Trying to take a Lock while interrupts are disabled is always a bug.
-rw-r--r-- | AK/Lock.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -52,6 +52,7 @@ private: inline void Lock::lock() { + ASSERT_INTERRUPTS_ENABLED(); ASSERT(!Scheduler::is_active()); for (;;) { if (CAS(&m_lock, 1, 0) == 0) { |