1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

Kernel: Move new process registration out of Space spinlock scope

There appears to be no reason why the process registration needs
to happen under the space spin lock. As the first thread is not started
yet it should be completely uncontested, but it's still bad practice.
This commit is contained in:
Brian Gianforcaro 2021-07-11 23:25:24 -07:00 committed by Gunnar Beutner
parent 60a559af7e
commit 84b4b9447d

View file

@ -108,10 +108,10 @@ KResultOr<FlatPtr> Process::sys$fork(RegisterState& regs)
if (region == m_master_tls_region.unsafe_ptr())
child->m_master_tls_region = child_region;
}
Process::register_new(*child);
}
Process::register_new(*child);
PerformanceManager::add_process_created_event(*child);
ScopedSpinLock lock(g_scheduler_lock);