mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -12,7 +12,7 @@ ErrorOr<FlatPtr> Process::sys$fsync(int fd)
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||
TRY(require_promise(Pledge::stdio));
|
||||
auto description = TRY(fds().open_file_description(fd));
|
||||
auto description = TRY(open_file_description(fd));
|
||||
TRY(description->sync());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user