]> git.corax.cc Git - corax/commitdiff
sched/common: Define __SCHED_COMMON in common.c so that scheduler-global variables...
authorMatthias Kruk <m@m10k.eu>
Mon, 10 Feb 2020 10:49:15 +0000 (19:49 +0900)
committerMatthias Kruk <m@m10k.eu>
Mon, 10 Feb 2020 10:49:15 +0000 (19:49 +0900)
kernel/sched/common.c
kernel/sched/lazy.c

index 0db6396eb0b3992f3c1862158d76975154fad039..c1efdd9f06c62e26664078b3438980bfccb73e2c 100644 (file)
@@ -1,5 +1,7 @@
+#define __SCHED_COMMON 1
 #include <config.h>
 #include <sched.h>
+#include <debug.h>
 
 extern int sched_lazy_init(struct sched**);
 
@@ -12,12 +14,14 @@ int sched_init(void)
                ret_val = sched_lazy_init(&_sched[i]);
 
                if(ret_val < 0) {
+                       dbg_printf("Failed to initialize scheduler for cpu%d\n", i);
                        break;
                }
        }
 
        if(ret_val < 0) {
                /* Failed to initialize scheduler for CPU */
+               dbg_printf("Some schedulers could not be initialized\n");
        }
 
        return(ret_val);
index ec45800c9e4bdb7f2a57783b495623e48bf2cde9..88f76c04fd276939eb751378193ad9843e17825e 100644 (file)
@@ -88,6 +88,7 @@ static int _lazy_tick(struct sched_lazy *lazy)
        return(ret_val);
 }
 
+/* FIXME: Consider adding flags to sched->sleep() to force interruption of running tasks */
 static int _lazy_sleep(struct sched_lazy *lazy, struct task *task)
 {
        struct task *ctask;