From 49d76d30a55707e2bf95fd9ba03296489fac8d1d Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 17 Feb 2021 09:11:39 -0500 Subject: making win+space work when no tasks are running --- src/kernel/task.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/kernel/task.c') diff --git a/src/kernel/task.c b/src/kernel/task.c index e2412e1..8d8de86 100644 --- a/src/kernel/task.c +++ b/src/kernel/task.c @@ -86,12 +86,12 @@ void advance_active_task() { } void make_sure_tasks() { - for (uint8_t n = 0; n < MAX_TASKS; ++n) - if (tasks[n].page_directory) - return; - logf(LOG_INFO, "No tasks, halting."); - while (1) - asm("hlt"); + while (1) { + for (uint8_t n = 0; n < MAX_TASKS; ++n) + if (tasks[n].page_directory) + return; + tmp_halt(); + } } //IPC stuff isn't fully implemented, or tested in this version. -- cgit v1.2.3