mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 06:28:13 +00:00
Kernel: Convert process file descriptor table to a SpinlockProtected
Instead of manually locking in the various member functions of Process::OpenFileDescriptions, simply wrap it in a SpinlockProtected.
This commit is contained in:
parent
93e90e16c3
commit
8ebec2938c
30 changed files with 257 additions and 190 deletions
|
@ -217,7 +217,7 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<const Syscall::SC_mmap_params*> use
|
|||
return EINVAL;
|
||||
if (static_cast<size_t>(offset) & ~PAGE_MASK)
|
||||
return EINVAL;
|
||||
auto description = TRY(fds().open_file_description(fd));
|
||||
auto description = TRY(open_file_description(fd));
|
||||
if (description->is_directory())
|
||||
return ENODEV;
|
||||
// Require read access even when read protection is not requested.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue