summaryrefslogtreecommitdiff
path: root/Kernel/Tasks/SyncTask.cpp
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-11-15 11:58:19 -0700
committerAndreas Kling <kling@serenityos.org>2020-11-30 13:17:02 +0100
commit6cb640eebaf40acbd505bcfdb0dee8e99fb77223 (patch)
tree59df685d35fbc30cde064ad6a71479aadd66aeec /Kernel/Tasks/SyncTask.cpp
parente0e26c6c679cad38c809ff3d898d135e505c67ff (diff)
downloadserenity-6cb640eebaf40acbd505bcfdb0dee8e99fb77223.zip
Kernel: Move some time related code from Scheduler into TimeManagement
Use the TimerQueue to expire blocking operations, which is one less thing the Scheduler needs to check on every iteration. Also, add a BlockTimeout class that will automatically handle relative or absolute timeouts as well as overriding timeouts (e.g. socket timeouts) more consistently. Also, rework the TimerQueue class to be able to fire events from any processor, which requires Timer to be RefCounted. Also allow creating id-less timers for use by blocking operations.
Diffstat (limited to 'Kernel/Tasks/SyncTask.cpp')
-rw-r--r--Kernel/Tasks/SyncTask.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Tasks/SyncTask.cpp b/Kernel/Tasks/SyncTask.cpp
index 58c9e3c933..4b463dc7e2 100644
--- a/Kernel/Tasks/SyncTask.cpp
+++ b/Kernel/Tasks/SyncTask.cpp
@@ -38,7 +38,7 @@ void SyncTask::spawn()
dbg() << "SyncTask is running";
for (;;) {
VFS::the().sync();
- Thread::current()->sleep(1 * TimeManagement::the().ticks_per_second());
+ Thread::current()->sleep({ 1, 0 });
}
});
}