Kernel: Rework whole ATA driver structure

Make ATA driver more compatible when we are adding SATA support
This commit is contained in:
2023-10-07 15:46:30 +03:00
parent 27eb5af6f0
commit f21d4e794c
29 changed files with 400 additions and 347 deletions

View File

@@ -15,10 +15,12 @@ namespace Kernel
void initialize_device_updater();
void add_device(BAN::StringView path, BAN::RefPtr<RamInode>);
void add_device(BAN::RefPtr<Device>);
void add_inode(BAN::StringView path, BAN::RefPtr<RamInode>);
void for_each_device(const BAN::Function<BAN::Iteration(Device*)>& callback);
dev_t get_next_dev();
dev_t get_next_dev() const;
int get_next_input_device() const;
void initiate_sync(bool should_block);
@@ -28,7 +30,7 @@ namespace Kernel
{ }
private:
SpinLock m_device_lock;
mutable SpinLock m_device_lock;
Semaphore m_sync_done;
Semaphore m_sync_semaphore;