summaryrefslogtreecommitdiff
path: root/Kernel/Random.h
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-09-05 10:02:03 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-05 20:46:02 +0200
commitbb58a4d94394ae19e0b850b15cfb105c91a1ee7b (patch)
tree95e33e16bd0685ff3a7e5f3c287be64cea0f7532 /Kernel/Random.h
parent5905d2e9e9380f6c4d0fc370ba8271371e87e1d3 (diff)
downloadserenity-bb58a4d94394ae19e0b850b15cfb105c91a1ee7b.zip
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.
Diffstat (limited to 'Kernel/Random.h')
-rw-r--r--Kernel/Random.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Random.h b/Kernel/Random.h
index 17a0e3e2ee..e2c788fb30 100644
--- a/Kernel/Random.h
+++ b/Kernel/Random.h
@@ -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;