sched: add timer tasks and schedule_timeout()
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user