mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:18:11 +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
|
@ -23,7 +23,7 @@ public:
|
|||
void reclaim_space(PhysicalAddress chunk_start, size_t chunk_size);
|
||||
PhysicalAddress start_of_used() const;
|
||||
|
||||
Spinlock<u8>& lock() { return m_lock; }
|
||||
Spinlock& lock() { return m_lock; }
|
||||
size_t used_bytes() const { return m_num_used_bytes; }
|
||||
PhysicalAddress start_of_region() const { return m_region->physical_page(0)->paddr(); }
|
||||
VirtualAddress vaddr() const { return m_region->vaddr(); }
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
private:
|
||||
OwnPtr<Memory::Region> m_region;
|
||||
Spinlock<u8> m_lock;
|
||||
Spinlock m_lock;
|
||||
size_t m_start_of_used {};
|
||||
size_t m_num_used_bytes {};
|
||||
size_t m_capacity_in_bytes {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue