mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +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()
|
inline void Lock::lock()
|
||||||
{
|
{
|
||||||
|
ASSERT_INTERRUPTS_ENABLED();
|
||||||
ASSERT(!Scheduler::is_active());
|
ASSERT(!Scheduler::is_active());
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (CAS(&m_lock, 1, 0) == 0) {
|
if (CAS(&m_lock, 1, 0) == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue