diff options
author | Timon Kruiper <timonkruiper@gmail.com> | 2022-08-23 21:42:30 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-26 12:51:57 +0200 |
commit | e8aff0c1c88510190285578f6539ca411faedd67 (patch) | |
tree | 155fbde0df2989d4f7d5a4a4296eb2fa4189ed4d /Kernel/ThreadBlockers.cpp | |
parent | 6432f3eee8b21979c0a455008f0a8d2124ed15a7 (diff) | |
download | serenity-e8aff0c1c88510190285578f6539ca411faedd67.zip |
Kernel: Use InterruptsState in Spinlock code
This commit updates the lock function from Spinlock and
RecursiveSpinlock to return the InterruptsState of the processor,
instead of the processor flags. The unlock functions would only look at
the interrupt flag of the processor flags, so we now use the
InterruptsState enum to clarify the intent, and such that we can use the
same Spinlock code for the aarch64 build.
To not break the build, all the call sites are updated aswell.
Diffstat (limited to 'Kernel/ThreadBlockers.cpp')
-rw-r--r-- | Kernel/ThreadBlockers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/ThreadBlockers.cpp b/Kernel/ThreadBlockers.cpp index a14e5fef46..52b89bec74 100644 --- a/Kernel/ThreadBlockers.cpp +++ b/Kernel/ThreadBlockers.cpp @@ -164,7 +164,7 @@ void Thread::FutexBlocker::finish_requeue(FutexQueue& futex_queue) VERIFY(m_lock.is_locked_by_current_processor()); set_blocker_set_raw_locked(&futex_queue); // We can now release the lock - m_lock.unlock(m_relock_flags); + m_lock.unlock(m_previous_interrupts_state); } bool Thread::FutexBlocker::unblock_bitset(u32 bitset) |