mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:08:10 +00:00
Kernel: Protect Process::m_name with a spinlock
This also lets us remove the `get_process_name` and `set_process_name` syscalls from the big lock. :^)
This commit is contained in:
parent
b26ecca970
commit
fe7b08dad7
13 changed files with 102 additions and 42 deletions
|
@ -79,7 +79,7 @@ ErrorOr<void> SysFSOverallProcesses::try_generate(KBufferBuilder& builder)
|
|||
TRY(process_object.add("tty"sv, ""));
|
||||
}
|
||||
TRY(process_object.add("nfds"sv, process.fds().with_shared([](auto& fds) { return fds.open_count(); })));
|
||||
TRY(process_object.add("name"sv, process.name()));
|
||||
TRY(process.name().with([&](auto& process_name) { return process_object.add("name"sv, process_name->view()); }));
|
||||
TRY(process_object.add("executable"sv, process.executable() ? TRY(process.executable()->try_serialize_absolute_path())->view() : ""sv));
|
||||
|
||||
size_t amount_virtual = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue