mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
Kernel: Don't acquire Mutex for hostname() before scheduling is enabled
There's no reason to acquire the mutex for this resource before APs are booted, before scheduling is enabled, and before interrupts are enabled.
This commit is contained in:
parent
54161bf5b4
commit
4f2520674c
|
@ -76,9 +76,9 @@ UNMAP_AFTER_INIT void Process::initialize()
|
|||
|
||||
next_pid.store(0, AK::MemoryOrder::memory_order_release);
|
||||
|
||||
hostname().with_exclusive([&](auto& name) {
|
||||
name = "courage";
|
||||
});
|
||||
// Note: This is called before scheduling is initialized, and before APs are booted.
|
||||
// So we can "safely" bypass the lock here.
|
||||
reinterpret_cast<String&>(hostname()) = "courage";
|
||||
|
||||
create_signal_trampoline();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue