1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 10:01:13 +09:00

Kernel: Convert hostname to KString

This commit is contained in:
Idan Horowitz 2022-01-13 00:27:33 +02:00 committed by Brian Gianforcaro
parent 6402840670
commit 50d6a6a186
Notes: sideshowbarker 2024-07-17 21:01:09 +09:00
4 changed files with 8 additions and 8 deletions

View file

@ -45,9 +45,9 @@ static Atomic<pid_t> next_pid;
static Singleton<SpinlockProtected<Process::List>> s_all_instances;
READONLY_AFTER_INIT Memory::Region* g_signal_trampoline_region;
static Singleton<MutexProtected<String>> s_hostname;
static Singleton<MutexProtected<OwnPtr<KString>>> s_hostname;
MutexProtected<String>& hostname()
MutexProtected<OwnPtr<KString>>& hostname()
{
return *s_hostname;
}
@ -73,7 +73,7 @@ UNMAP_AFTER_INIT void Process::initialize()
// 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";
reinterpret_cast<OwnPtr<KString>&>(hostname()) = KString::must_create("courage"sv);
create_signal_trampoline();
}