mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +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
|
@ -238,7 +238,7 @@ bool AHCIPort::initialize_without_reset()
|
|||
return initialize(lock);
|
||||
}
|
||||
|
||||
bool AHCIPort::initialize(SpinlockLocker<Spinlock<u8>>& main_lock)
|
||||
bool AHCIPort::initialize(SpinlockLocker<Spinlock>& main_lock)
|
||||
{
|
||||
VERIFY(m_lock.is_locked());
|
||||
dbgln_if(AHCI_DEBUG, "AHCI Port {}: Initialization. Signature = {:#08x}", representative_port_index(), static_cast<u32>(m_port_registers.sig));
|
||||
|
@ -591,7 +591,7 @@ bool AHCIPort::access_device(AsyncBlockDeviceRequest::RequestType direction, u64
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AHCIPort::identify_device(SpinlockLocker<Spinlock<u8>>& main_lock)
|
||||
bool AHCIPort::identify_device(SpinlockLocker<Spinlock>& main_lock)
|
||||
{
|
||||
VERIFY(m_lock.is_locked());
|
||||
VERIFY(is_operable());
|
||||
|
@ -740,7 +740,7 @@ void AHCIPort::stop_fis_receiving() const
|
|||
m_port_registers.cmd = m_port_registers.cmd & 0xFFFFFFEF;
|
||||
}
|
||||
|
||||
bool AHCIPort::initiate_sata_reset(SpinlockLocker<Spinlock<u8>>& main_lock)
|
||||
bool AHCIPort::initiate_sata_reset(SpinlockLocker<Spinlock>& main_lock)
|
||||
{
|
||||
VERIFY(m_lock.is_locked());
|
||||
VERIFY(m_hard_lock.is_locked());
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
private:
|
||||
bool is_phy_enabled() const { return (m_port_registers.ssts & 0xf) == 3; }
|
||||
bool initialize(SpinlockLocker<Spinlock<u8>>&);
|
||||
bool initialize(SpinlockLocker<Spinlock>&);
|
||||
|
||||
UNMAP_AFTER_INIT AHCIPort(const AHCIPortHandler&, volatile AHCI::PortRegisters&, u32 port_index);
|
||||
|
||||
|
@ -62,7 +62,7 @@ private:
|
|||
const char* try_disambiguate_sata_status();
|
||||
void try_disambiguate_sata_error();
|
||||
|
||||
bool initiate_sata_reset(SpinlockLocker<Spinlock<u8>>&);
|
||||
bool initiate_sata_reset(SpinlockLocker<Spinlock>&);
|
||||
void rebase();
|
||||
void recover_from_fatal_error();
|
||||
bool shutdown();
|
||||
|
@ -79,7 +79,7 @@ private:
|
|||
|
||||
bool spin_until_ready() const;
|
||||
|
||||
bool identify_device(SpinlockLocker<Spinlock<u8>>&);
|
||||
bool identify_device(SpinlockLocker<Spinlock>&);
|
||||
|
||||
ALWAYS_INLINE void start_command_list_processing() const;
|
||||
ALWAYS_INLINE void mark_command_header_ready_to_process(u8 command_header_index) const;
|
||||
|
@ -101,7 +101,7 @@ private:
|
|||
|
||||
EntropySource m_entropy_source;
|
||||
RefPtr<AsyncBlockDeviceRequest> m_current_request;
|
||||
Spinlock<u8> m_hard_lock;
|
||||
Spinlock m_hard_lock;
|
||||
Mutex m_lock { "AHCIPort" };
|
||||
|
||||
mutable bool m_wait_for_completion { false };
|
||||
|
|
|
@ -157,7 +157,7 @@ protected:
|
|||
RefPtr<AsyncBlockDeviceRequest> m_current_request;
|
||||
u64 m_current_request_block_index { 0 };
|
||||
bool m_current_request_flushing_cache { false };
|
||||
Spinlock<u8> m_request_lock;
|
||||
Spinlock m_request_lock;
|
||||
Mutex m_lock { "IDEChannel" };
|
||||
|
||||
IOAddressGroup m_io_group;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue