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:
Andreas Kling 2022-01-29 01:22:28 +01:00
commit 8ebec2938c
Notes: sideshowbarker 2024-07-18 00:54:03 +09:00
30 changed files with 257 additions and 190 deletions

View file

@ -32,7 +32,7 @@ ErrorOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*> u
auto fs_type_string = TRY(try_copy_kstring_from_user(params.fs_type));
auto fs_type = fs_type_string->view();
auto description_or_error = fds().open_file_description(source_fd);
auto description_or_error = open_file_description(source_fd);
if (!description_or_error.is_error())
dbgln("mount {}: source fd {} @ {}", fs_type, source_fd, target);
else