mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +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
|
@ -916,7 +916,7 @@ KResult ProcFSRootDirectory::traverse_as_directory(unsigned fsid, Function<bool(
|
|||
InodeIdentifier identifier = { fsid, component.component_index() };
|
||||
callback({ component.name(), identifier, 0 });
|
||||
}
|
||||
processes().for_each_shared([&](Process& process) {
|
||||
processes().for_each([&](Process& process) {
|
||||
VERIFY(!(process.pid() < 0));
|
||||
u64 process_id = (u64)process.pid().value();
|
||||
InodeIdentifier identifier = { fsid, static_cast<InodeIndex>(process_id << 36) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue