mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09: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
Notes:
sideshowbarker
2024-07-18 05:08:37 +09:00
Author: https://github.com/ADKaster
Commit: 4f2520674c
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
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