mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 05:05:08 +00:00
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.
This commit is contained in:
parent
e0e26c6c67
commit
6cb640eeba
19 changed files with 461 additions and 263 deletions
|
@ -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 });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue