mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
AK: Lock should ASSERT_INTERRUPTS_ENABLED().
Trying to take a Lock while interrupts are disabled is always a bug.
This commit is contained in:
parent
a1b63bb6d4
commit
d0b2949b4d
1 changed files with 1 additions and 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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue