summaryrefslogtreecommitdiff
path: root/Kernel/Locking/Spinlock.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/Locking/Spinlock.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/Locking/Spinlock.h')
-rw-r--r--Kernel/Locking/Spinlock.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Locking/Spinlock.h b/Kernel/Locking/Spinlock.h
index 2c1808185a..7e2843fd69 100644
--- a/Kernel/Locking/Spinlock.h
+++ b/Kernel/Locking/Spinlock.h
@@ -13,7 +13,6 @@
namespace Kernel {
-template<typename BaseType = u32>
class Spinlock {
AK_MAKE_NONCOPYABLE(Spinlock);
AK_MAKE_NONMOVABLE(Spinlock);
@@ -54,7 +53,7 @@ public:
}
private:
- Atomic<BaseType> m_lock { 0 };
+ Atomic<u8> m_lock { 0 };
};
class RecursiveSpinlock {