summaryrefslogtreecommitdiff
path: root/Kernel/init.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-17 15:04:27 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-17 15:04:27 +0100
commit48f7c28a5cee78398c64d94f7dc3c6bf5a66ce77 (patch)
treec072ef54fa2e311ac8119e2f2f1ed69c5a22a061 /Kernel/init.cpp
parent4f4af24b9d489634a66d818260a7f87964faf421 (diff)
downloadserenity-48f7c28a5cee78398c64d94f7dc3c6bf5a66ce77.zip
Kernel: Replace "current" with Thread::current and Process::current
Suggested by Sergey. The currently running Thread and Process are now Thread::current and Process::current respectively. :^)
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r--Kernel/init.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 235f58da9d..877f26d0f2 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -174,17 +174,17 @@ extern "C" [[noreturn]] void init()
Process::create_kernel_process(syncd_thread, "syncd", [] {
for (;;) {
VFS::the().sync();
- current->sleep(1 * TICKS_PER_SECOND);
+ Thread::current->sleep(1 * TICKS_PER_SECOND);
}
});
Process::create_kernel_process(g_finalizer, "Finalizer", [] {
- current->set_priority(THREAD_PRIORITY_LOW);
+ Thread::current->set_priority(THREAD_PRIORITY_LOW);
for (;;) {
{
InterruptDisabler disabler;
if (!g_finalizer_has_work)
- current->wait_on(*g_finalizer_wait_queue);
+ Thread::current->wait_on(*g_finalizer_wait_queue);
ASSERT(g_finalizer_has_work);
g_finalizer_has_work = false;
}
@@ -303,7 +303,7 @@ void init_stage2()
hang();
}
- current->process().set_root_directory(VFS::the().root_custody());
+ Process::current->set_root_directory(VFS::the().root_custody());
dbgprintf("Load ksyms\n");
load_ksyms();
@@ -356,7 +356,7 @@ void init_stage2()
Process::create_kernel_process(thread, "NetworkTask", NetworkTask_main);
}
- current->process().sys$exit(0);
+ Process::current->sys$exit(0);
ASSERT_NOT_REACHED();
}