Kernel: Lock process functions instead of the ata controller

Process has to use locks at least on some functions so multithreaded
disk io is safe. This seemed to fix corrupted reads from disk
This commit is contained in:
Bananymous
2023-03-24 01:17:39 +02:00
parent e5eab8bae4
commit 5fd26b4ea8
4 changed files with 18 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
#pragma once
#include <BAN/Errors.h>
#include <kernel/SpinLock.h>
#include <kernel/Storage/StorageController.h>
namespace Kernel
@@ -68,7 +67,6 @@ namespace Kernel
BAN::ErrorOr<void> write(ATADevice*, uint64_t, uint8_t, const uint8_t*);
private:
SpinLock m_lock;
ATABus m_buses[2];
const PCIDevice& m_pci_device;