mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03: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: https://github.com/SerenityOS/serenity/commit/4f2520674ca 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
@ -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 New Issue
Block a user