diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-07 20:30:38 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-07 20:30:38 +0100 |
commit | 64a71038a21f42874175ab210a64bf6bbc6dd6f5 (patch) | |
tree | 67728a5370c74dc4cb4245db2ed2f930a7907c40 /kernel/l0/task.c | |
parent | 42e92e7e9ab971acd6a1a55e38c0f4e999c1293c (diff) | |
download | kogata-64a71038a21f42874175ab210a64bf6bbc6dd6f5.tar.gz kogata-64a71038a21f42874175ab210a64bf6bbc6dd6f5.zip |
Tweaks in code presentation.
Diffstat (limited to 'kernel/l0/task.c')
-rw-r--r-- | kernel/l0/task.c | 12 |
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(¤t_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 |