1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:38:13 +00:00

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.
This commit is contained in:
Timon Kruiper 2022-08-23 21:42:30 +02:00 committed by Andreas Kling
parent 6432f3eee8
commit e8aff0c1c8
12 changed files with 41 additions and 51 deletions

View file

@ -90,7 +90,7 @@ struct MemoryManagerData {
static ProcessorSpecificDataID processor_specific_data_id() { return ProcessorSpecificDataID::MemoryManager; }
Spinlock m_quickmap_in_use { LockRank::None };
u32 m_quickmap_prev_flags;
InterruptsState m_quickmap_previous_interrupts_state;
};
// This class represents a set of committed physical pages.