Add a basic scheduler with threads #18

Merged
apio merged 19 commits from threads into restart 2022-12-07 16:11:59 +00:00
Showing only changes of commit 7c557b2eb4 - Show all commits

View File

@ -58,6 +58,11 @@ namespace Timer
timer_ticks++;
}
usize raw_ticks()
{
return timer_ticks;
}
usize ticks()
{
return ticks_ms() / 1000;
@ -130,5 +135,6 @@ namespace Timer
bool should_invoke_scheduler()
{
// FIXME: Modulo is SLOW. We're calling this every tick.
return (timer_ticks % ARCH_TIMER_FREQ) == 0;
}