mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48: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
|
@ -27,7 +27,7 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
|
|||
}
|
||||
};
|
||||
|
||||
auto child_name = TRY(m_name->try_clone());
|
||||
auto child_name = TRY(name().with([](auto& name) { return name->try_clone(); }));
|
||||
auto credentials = this->credentials();
|
||||
auto child = TRY(Process::try_create(child_first_thread, move(child_name), credentials->uid(), credentials->gid(), pid(), m_is_kernel_process, current_directory(), executable(), m_tty, this));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue