Kernel: DevFS now stores all devices

This allows removing hack in PCI that was required to keep NVMe
controller alive.
This commit is contained in:
2024-01-24 14:33:50 +02:00
parent 5001fa58e0
commit 2cee2a85e6
3 changed files with 17 additions and 39 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include <BAN/Vector.h>
#include <kernel/Device/Device.h>
#include <kernel/FS/TmpFS/FileSystem.h>
#include <kernel/Semaphore.h>
@@ -17,7 +18,6 @@ namespace Kernel
void add_device(BAN::RefPtr<Device>);
void add_inode(BAN::StringView path, BAN::RefPtr<TmpInode>);
void for_each_device(const BAN::Function<BAN::Iteration(Device*)>& callback);
dev_t get_next_dev() const;
int get_next_input_device() const;
@@ -32,6 +32,8 @@ namespace Kernel
private:
mutable SpinLock m_device_lock;
BAN::Vector<BAN::RefPtr<Device>> m_devices;
Semaphore m_sync_done;
Semaphore m_sync_semaphore;
volatile bool m_should_sync { false };