]> git.corax.cc Git - corax/commitdiff
Make debug output from the scheduler depend on CONFIG_DEBUG_SCHED
authorMatthias Kruk <m@m10k.eu>
Wed, 2 Oct 2019 05:02:49 +0000 (14:02 +0900)
committerMatthias Kruk <m@m10k.eu>
Wed, 2 Oct 2019 05:03:07 +0000 (14:03 +0900)
config.h
kernel/core/sched.c

index c9df92245d04e9924332219ff686aa0dd856abb3..2688243181f5cdd9e8e0ed353cdd4ad7440e9cfb 100644 (file)
--- a/config.h
+++ b/config.h
@@ -36,7 +36,9 @@
 #define CONFIG_SMP_CPUS 1
 
 #define CONFIG_POSIX    1
-#define CONFIG_DEBUG    0
+
+#define CONFIG_DEBUG       0
+#define CONFIG_DEBUG_SCHED 0
 
 /* sanity checks */
 
index 8fa6199e233bb55a1ffc488e9fbd24b20c85e0f9..e0a6182bcfeb089970d724f7cacf224fb753f792 100644 (file)
@@ -77,9 +77,13 @@ void sched_tick(void)
        cur_task = _dq(&_readyq);
 
        if(cur_task) {
+#if FEATURE(DEBUG_SCHED)
                dbg_printf("Switch to task %p [%02x]\n", cur_task, cur_task->t_state);
+#endif /* FEATURE(DEBUG_SCHED) */
                task_switch(cur_task);
+#if FEATURE(DEBUG_SCHED)
                dbg_printf("Returned to task %p\n", task_get_current());
+#endif /* FEATURE(DEBUG_SCHED) */
        } else {
                dbg_printf("This should not have happened\n");
        }