summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/dump.c10
-rw-r--r--src/kernel/task.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/dump.c b/src/kernel/dump.c
index d0c02e6..f8d7385 100644
--- a/src/kernel/dump.c
+++ b/src/kernel/dump.c
@@ -53,7 +53,7 @@ static void write_mem_page(uint32_t page) {
#include "kbd.h"
-#define WAIT_TASK tasks[i].waits[t].task - tasks + 1, tasks[i].waits[t].task->name
+#define WAIT_TASK tasks[t].waits[i].task->name, tasks[t].waits[i].task - tasks + 1
void dump(enum kbd_isr_result kind, const uint32_t edi, const uint32_t esi, const uint32_t ebx, const uint32_t edx, const uint32_t ecx, const uint32_t eax, const uint32_t eip, const uint32_t cs, const uint32_t eflags, const uint32_t esp, const uint32_t ss) {
uint32_t cr3;
@@ -99,23 +99,23 @@ void dump(enum kbd_isr_result kind, const uint32_t edi, const uint32_t esi, cons
if (tasks[t].waiting) {
logf(LOG_DUMP, " Waits:");
for (uint8_t i = 0; i < MAX_WAITS; ++i)
- switch (tasks[i].waits[t].mode) {
+ switch (tasks[t].waits[i].mode) {
case NONE:
continue;
case PROCESS_END:
- logf(LOG_DUMP, " Waiting for task 0x%hb (%s) to end", WAIT_TASK);
+ logf(LOG_DUMP, " Waiting for task %s (0x%hb) to end", WAIT_TASK);
continue;
case WINDOW_ACTION:
logf(LOG_DUMP, " Waiting for window action");
continue;
case IPC_SENT:
- logf(LOG_DUMP, " Waiting for IPC to be sent by 0x%hb (%s)", WAIT_TASK);
+ logf(LOG_DUMP, " Waiting for IPC to be sent by %s (0x%hb)", WAIT_TASK);
continue;
case IPC_SENT_ANY:
logf(LOG_DUMP, " Waiting for IPC to be sent by anyone");
continue;
case IPC_READ:
- logf(LOG_DUMP, " Waiting for IPC to be read by 0x%hb (%s)", WAIT_TASK);
+ logf(LOG_DUMP, " Waiting for IPC to be read by %s (0x%hb)", WAIT_TASK);
continue;
default:
logf(LOG_DUMP, " Other (corrupted?)");
diff --git a/src/kernel/task.c b/src/kernel/task.c
index 8d8de86..93310bc 100644
--- a/src/kernel/task.c
+++ b/src/kernel/task.c
@@ -296,7 +296,7 @@ void unwait(struct task_state *task, struct wait wait) {
default:
PANIC("Unwait matched with unrecognized wait mode.");
}
- for (uint8_t i = 0; i < MAX_WAITS; ++i)
+ for (i = 0; i < MAX_WAITS; ++i)
task->waits[i].mode = NONE;
task->waiting = false;
return;