Update src/core/file_sys/fs.cpp

Co-authored-by: GPUCode <47210458+GPUCode@users.noreply.github.com>
This commit is contained in:
georgemoralis 2023-11-08 07:56:40 +02:00 committed by GitHub
parent c6459f35a7
commit f8cc51496d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ void HandleTable::deleteHandle(int d) {
delete m_files.at(d - RESERVED_HANDLES); delete m_files.at(d - RESERVED_HANDLES);
m_files[d - RESERVED_HANDLES] = nullptr; m_files[d - RESERVED_HANDLES] = nullptr;
} }
File* HandleTable::getFile(int d) { File* HandleTable::getFile(int d) {
std::unique_lock lock{m_mutex}; std::unique_lock lock{m_mutex};
return m_files.at(d - RESERVED_HANDLES); return m_files.at(d - RESERVED_HANDLES);