mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
Kernel: Make all Spinlocks use u8 for storage, remove template
The default template argument is only used in one place, and it looks like it was probably just an oversight. The rest of the Kernel code all uses u8 as the type. So lets make that the default and remove the unused template argument, as there doesn't seem to be a reason to allow the size to be customizable.
This commit is contained in:
parent
5905d2e9e9
commit
bb58a4d943
38 changed files with 56 additions and 58 deletions
|
@ -81,7 +81,7 @@ public:
|
|||
return is_seeded() || m_p0_len >= reseed_threshold;
|
||||
}
|
||||
|
||||
Spinlock<u8>& get_lock() { return m_lock; }
|
||||
Spinlock& get_lock() { return m_lock; }
|
||||
|
||||
private:
|
||||
void reseed()
|
||||
|
@ -107,7 +107,7 @@ private:
|
|||
size_t m_p0_len { 0 };
|
||||
ByteBuffer m_key;
|
||||
HashType m_pools[pool_count];
|
||||
Spinlock<u8> m_lock;
|
||||
Spinlock m_lock;
|
||||
};
|
||||
|
||||
class KernelRng : public Lockable<FortunaPRNG<Crypto::Cipher::AESCipher, Crypto::Hash::SHA256, 256>> {
|
||||
|
@ -121,7 +121,7 @@ public:
|
|||
|
||||
void wake_if_ready();
|
||||
|
||||
Spinlock<u8>& get_lock() { return resource().get_lock(); }
|
||||
Spinlock& get_lock() { return resource().get_lock(); }
|
||||
|
||||
private:
|
||||
WaitQueue m_seed_queue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue