fixing waits output in alt+pause
This commit is contained in:
parent
7997306160
commit
78853170f8
2 changed files with 6 additions and 6 deletions
|
@ -53,7 +53,7 @@ static void write_mem_page(uint32_t page) {
|
||||||
|
|
||||||
#include "kbd.h"
|
#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) {
|
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;
|
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) {
|
if (tasks[t].waiting) {
|
||||||
logf(LOG_DUMP, " Waits:");
|
logf(LOG_DUMP, " Waits:");
|
||||||
for (uint8_t i = 0; i < MAX_WAITS; ++i)
|
for (uint8_t i = 0; i < MAX_WAITS; ++i)
|
||||||
switch (tasks[i].waits[t].mode) {
|
switch (tasks[t].waits[i].mode) {
|
||||||
case NONE:
|
case NONE:
|
||||||
continue;
|
continue;
|
||||||
case PROCESS_END:
|
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;
|
continue;
|
||||||
case WINDOW_ACTION:
|
case WINDOW_ACTION:
|
||||||
logf(LOG_DUMP, " Waiting for window action");
|
logf(LOG_DUMP, " Waiting for window action");
|
||||||
continue;
|
continue;
|
||||||
case IPC_SENT:
|
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;
|
continue;
|
||||||
case IPC_SENT_ANY:
|
case IPC_SENT_ANY:
|
||||||
logf(LOG_DUMP, " Waiting for IPC to be sent by anyone");
|
logf(LOG_DUMP, " Waiting for IPC to be sent by anyone");
|
||||||
continue;
|
continue;
|
||||||
case IPC_READ:
|
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;
|
continue;
|
||||||
default:
|
default:
|
||||||
logf(LOG_DUMP, " Other (corrupted?)");
|
logf(LOG_DUMP, " Other (corrupted?)");
|
||||||
|
|
|
@ -296,7 +296,7 @@ void unwait(struct task_state *task, struct wait wait) {
|
||||||
default:
|
default:
|
||||||
PANIC("Unwait matched with unrecognized wait mode.");
|
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->waits[i].mode = NONE;
|
||||||
task->waiting = false;
|
task->waiting = false;
|
||||||
return;
|
return;
|
||||||
|
|
Reference in a new issue