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

Kernel: Require lock rank for Spinlock construction

All users which relied on the default constructor use a None lock rank
for now. This will make it easier to in the future remove LockRank and
actually annotate the ranks by searching for None.
This commit is contained in:
kleines Filmröllchen 2022-08-18 21:46:28 +02:00 committed by Brian Gianforcaro
parent 4809dc8ec2
commit 4314c25cf2
59 changed files with 87 additions and 78 deletions

View file

@ -382,7 +382,8 @@ public:
bool add_to_blocker_set(BlockerSet&, void* = nullptr);
void set_blocker_set_raw_locked(BlockerSet* blocker_set) { m_blocker_set = blocker_set; }
mutable RecursiveSpinlock m_lock;
// FIXME: Figure out whether this can be Thread.
mutable RecursiveSpinlock m_lock { LockRank::None };
private:
BlockerSet* m_blocker_set { nullptr };
@ -500,7 +501,8 @@ public:
blockers_to_append.clear();
}
mutable Spinlock m_lock;
// FIXME: Check whether this can be Thread.
mutable Spinlock m_lock { LockRank::None };
private:
Vector<BlockerInfo, 4> m_blockers;
@ -1227,7 +1229,7 @@ private:
void reset_fpu_state();
mutable RecursiveSpinlock m_lock { LockRank::Thread };
mutable RecursiveSpinlock m_block_lock;
mutable RecursiveSpinlock m_block_lock { LockRank::None };
NonnullRefPtr<Process> m_process;
ThreadID m_tid { -1 };
ThreadRegisters m_regs {};
@ -1274,7 +1276,7 @@ private:
unsigned count;
};
Atomic<u32> m_holding_locks { 0 };
Spinlock m_holding_locks_lock;
Spinlock m_holding_locks_lock { LockRank::None };
Vector<HoldingLockInfo> m_holding_locks_list;
#endif