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
commit 84b4b9447d
Notes: sideshowbarker 2024-07-18 09:12:44 +09:00

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);