aboutsummaryrefslogtreecommitdiff
path: root/kernel/l0/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/l0/task.c')
-rw-r--r--kernel/l0/task.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/l0/task.c b/kernel/l0/task.c
index e31a85c..80066d8 100644
--- a/kernel/l0/task.c
+++ b/kernel/l0/task.c
@@ -148,12 +148,16 @@ task_t *new_task(entry_t entry) {
t->current_pd_d = get_kernel_pagedir();
- t->more_data = 0;
+ t->more_data = 0; // free for use by L1 functions
return t;
}
-void irq0_handler(registers_t *regs) {
+// ========== //
+// SETUP CODE //
+// ========== //
+
+static void irq0_handler(registers_t *regs) {
if (current_task != 0)
irq0_save_context_and_enter_scheduler(&current_task->ctx);
}
@@ -170,6 +174,10 @@ void tasking_setup(entry_t cont, void* arg) {
ASSERT(false);
}
+// ======================= //
+// TASK STATE MANIPULATION //
+// ======================= //
+
void yield() {
if (current_task == 0) {
// might happen before tasking is initialized