]> Zhao Yanbai Git Server - kernel.git/commitdiff
解决在delay_tasks列表中出现READY状态任务的问题
authoracevest <zhaoyanbai@126.com>
Sat, 27 May 2023 04:02:32 +0000 (12:02 +0800)
committeracevest <zhaoyanbai@126.com>
Sat, 27 May 2023 04:02:32 +0000 (12:02 +0800)
drivers/keyboard.c
kernel/sched.c
kernel/setup.c

index 0bc1458f74a5996166a9c109319c876d89d33bbc..b248dae3f2e1dee55c2547845d123056f813a3bb 100644 (file)
@@ -76,7 +76,7 @@ void kbd_debug(unsigned char scan_code) {
     printl(MPL_KEYBOARD, "keyboard irq: %d scan code %02x", kbd_cnt++, scan_code);
 
     if (scan_code == 0x01) {  // Esc
-        reboot();
+        // reboot();
     }
 
     printd("[%02x]", scan_code);
index 82c272dcf0b581e19fbf1cc5be36c8784952f3af..8849bda1b756dbe421d006d910f88abb5d551fbb 100644 (file)
@@ -196,6 +196,9 @@ void schedule() {
     if (0 == current->ticks) {
         current->turn++;
         current->ticks = current->priority;
+    }
+
+    if (current->state == TASK_RUNNING) {
         current->state = TASK_READY;
     }
 
index aff660db27ffccfe94ffa22ea0d2a01f5813e79e..4d2e7f560acf4e67c5ae0b86bc26a8a67715e900 100644 (file)
@@ -82,7 +82,7 @@ void setup_kernel() {
 
     cnsl_init();
 
-    printl(MPL_TITLE, "                                 SYSTEM MONITOR");
+    printl(MPL_TITLE, "                                 KERNEL MONITOR");
     printl(MPL_ROOTDEV, "root device %08x", system.root_dev);
 
     setup_tasks();