]> git.corax.cc Git - corax/commitdiff
kernel/core: Initialize the scheduler at boot time
authorMatthias Kruk <m@m10k.eu>
Mon, 10 Feb 2020 10:47:05 +0000 (19:47 +0900)
committerMatthias Kruk <m@m10k.eu>
Mon, 10 Feb 2020 10:47:05 +0000 (19:47 +0900)
kernel/core/main.c

index aaf0fef92a13bd8a09c69f51cb212fd74567df82..675cc1edd06872bbaa76d80e08124f1e9d9a7ae0 100644 (file)
 #include <sys/socket.h>
 #include <crxstd.h>
 #include <unistd.h>
+#include <sched.h>
 
 void cpu_debug(void);
 int arch_init(void*);
-void sched_tick(void);
+int sched_init(void);
 
 extern void io_main(void);
 extern void _stdio(void);
@@ -194,6 +195,12 @@ int corax(void *mb_info, u32_t magic)
        }
 #endif
 
+       err = sched_init();
+
+       if(err < 0) {
+               PANIC("Failed to initialize scheduler\n");
+       }
+
 /*
        for(ptr = (void*)0x9fc00; ptr < (void*)0x9fffc; ptr++) {
                if(*(u32_t*)ptr == 0x5f504d5f) {