summaryrefslogtreecommitdiff
path: root/src/kernel/task.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-17 09:11:39 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-17 09:11:39 -0500
commit49d76d30a55707e2bf95fd9ba03296489fac8d1d (patch)
treeda8b7f9b0fcf5fbe7d8a84fbdf9f51d35c5dfe61 /src/kernel/task.c
parent642c3c69a69220170e2f68c2bf6c898e6cb5b20b (diff)
downloadportland-os-49d76d30a55707e2bf95fd9ba03296489fac8d1d.tar.gz
making win+space work when no tasks are running
Diffstat (limited to 'src/kernel/task.c')
-rw-r--r--src/kernel/task.c12
1 files changed, 6 insertions, 6 deletions
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.