Kernel: Start work on making inodes more thread safe

All inode operations are now locked and thread blocked
This commit is contained in:
2023-09-09 22:45:27 +03:00
parent 39a5c52088
commit dd9af56e21
23 changed files with 229 additions and 105 deletions

View File

@@ -39,9 +39,9 @@ namespace Kernel
m_semaphore.unblock();
}
BAN::ErrorOr<size_t> Pipe::read(size_t, void* buffer, size_t count)
BAN::ErrorOr<size_t> Pipe::read_impl(off_t, void* buffer, size_t count)
{
m_lock.lock();
LockGuard _(m_lock);
while (m_buffer.empty())
{
if (m_writing_count == 0)
@@ -61,12 +61,10 @@ namespace Kernel
m_semaphore.unblock();
m_lock.unlock();
return to_copy;
}
BAN::ErrorOr<size_t> Pipe::write(size_t, const void* buffer, size_t count)
BAN::ErrorOr<size_t> Pipe::write_impl(off_t, const void* buffer, size_t count)
{
LockGuard _(m_lock);