Wrong calculation for last task ticks

This commit is contained in:
Alex 2023-02-27 17:57:52 +02:00
parent c601e6c76c
commit 81512f2b57
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -458,7 +458,7 @@ namespace Tasking
}
CPU::x64::writecr3({.raw = (uint64_t)KernelPageTable}); /* Restore kernel page table for safety reasons. */
uint64_t SchedTmpTicks = CPU::Counter();
this->LastTaskTicks = SchedTmpTicks - this->LastTaskTicks;
this->LastTaskTicks.Store(SchedTmpTicks - this->SchedulerTicks.Load());
CPUData *CurrentCPU = GetCurrentCPU();
schedbg("Scheduler called on CPU %d.", CurrentCPU->ID);
schedbg("%d: %ld%%", CurrentCPU->ID, GetUsage(CurrentCPU->ID));