1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +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:
Sam Atkins 2023-02-04 13:01:46 +00:00 committed by Andreas Kling
parent b26ecca970
commit fe7b08dad7
13 changed files with 102 additions and 42 deletions

View file

@ -22,7 +22,9 @@ ErrorOr<void> Process::do_kill(Process& process, int signal)
if (!can_send_signal)
return EPERM;
if (process.is_kernel_process()) {
dbgln("Attempted to send signal {} to kernel process {} ({})", signal, process.name(), process.pid());
process.name().with([&](auto& process_name) {
dbgln("Attempted to send signal {} to kernel process {} ({})", signal, process_name->view(), process.pid());
});
return EPERM;
}
if (signal != 0)