sched: add timer tasks and schedule_timeout()

This commit is contained in:
2023-04-30 21:09:36 +01:00
parent 085c3d2a89
commit 8a0291c9b3
8 changed files with 132 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
#include <stdint.h>
#include <socks/init.h>
#include <socks/clock.h>
#include <socks/panic.h>
#include <socks/test.h>
#include <socks/printk.h>
@@ -37,9 +38,8 @@ void kernel_init(uintptr_t arg)
run_all_tests();
current_thread()->tr_state = THREAD_SLEEPING;
while (1) {
ml_cpu_pause();
schedule_timeout(HZ);
printk("tick");
}
}