ladybird/Kernel/Tasks/SyncTask.cpp
Brian Gianforcaro 6b85b358f8 Kernel: Unify Kernel task names for consistency
This change unifies the naming convention for kernel tasks.

The goal of this change is to:

- Make the task names more descriptive, so users can more
  easily understand their purpose in System Monitor.

- Unify the naming convention so they are consistent.
2022-06-05 14:09:44 +01:00

28 lines
678 B
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/Tasks/SyncTask.h>
#include <Kernel/Time/TimeManagement.h>
namespace Kernel {
UNMAP_AFTER_INIT void SyncTask::spawn()
{
RefPtr<Thread> syncd_thread;
(void)Process::create_kernel_process(syncd_thread, KString::must_create("VFS Sync Task"), [] {
dbgln("VFS SyncTask is running");
for (;;) {
VirtualFileSystem::sync();
(void)Thread::current()->sleep(Time::from_seconds(1));
}
});
}
}