mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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
|
@ -490,7 +490,7 @@ private:
|
|||
process_object.add("uid", process.uid().value());
|
||||
process_object.add("gid", process.gid().value());
|
||||
process_object.add("ppid", process.ppid().value());
|
||||
process_object.add("nfds", process.fds().open_count());
|
||||
process_object.add("nfds", process.fds().with([](auto& fds) { return fds.open_count(); }));
|
||||
process_object.add("name", process.name());
|
||||
process_object.add("executable", process.executable() ? TRY(process.executable()->try_serialize_absolute_path())->view() : ""sv);
|
||||
process_object.add("tty", process.tty() ? process.tty()->tty_name().view() : "notty"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue