summaryrefslogtreecommitdiff
path: root/src/kernel/dump.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-17 18:38:54 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-17 18:38:54 -0500
commit78853170f8304ca7af29e7383f5efccedaf21454 (patch)
tree5e052673872ef667599bcbd999887430b7368b0e /src/kernel/dump.c
parent79973061600a2af480c4f8ec1e1e71846985b653 (diff)
downloadportland-os-78853170f8304ca7af29e7383f5efccedaf21454.tar.gz
fixing waits output in alt+pause
Diffstat (limited to 'src/kernel/dump.c')
-rw-r--r--src/kernel/dump.c10
1 files changed, 5 insertions, 5 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?)");