mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
Kernel: Guard the all processes list with a Spinlock rather than a Mutex
There are callers of processes().with or processes().for_each that require interrupts to be disabled. Taking a Mutexe with interrupts disabled is a recipe for deadlock, so convert this to a Spinlock.
This commit is contained in:
parent
70518e69f4
commit
dea62fe93c
Notes:
sideshowbarker
2024-07-18 05:08:45 +09:00
Author: https://github.com/ADKaster
Commit: dea62fe93c
Pull-request: https://github.com/SerenityOS/serenity/pull/9580
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bgianfo
4 changed files with 13 additions and 13 deletions
|
@ -65,7 +65,7 @@ KResult Process::do_killall(int signal)
|
|||
KResult error = KSuccess;
|
||||
|
||||
// Send the signal to all processes we have access to for.
|
||||
processes().for_each_shared([&](auto& process) {
|
||||
processes().for_each([&](auto& process) {
|
||||
KResult res = KSuccess;
|
||||
if (process.pid() == pid())
|
||||
res = do_killself(signal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue