mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +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
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue