UnnamedOS
schedule.c File Reference
#include <common.h>
#include <tasks/schedule.h>
#include <tasks/elf.h>
#include <tasks/tss.h>
#include <mem/mmu.h>
#include <mem/vmm.h>
+ Include dependency graph for schedule.c:

Go to the source code of this file.

Functions

cpu_state_tschedule (cpu_state_t *cpu)
 Returns the next task to run. More...
 
cpu_state_tschedule_switch_task (task_pid_t next_task)
 Switches to a given task. More...
 
task_pid_t schedule_get_current_task ()
 Returns the current task's PID. More...
 
task_pid_t schedule_get_next_task ()
 Returns the next running task's PID. More...
 
void schedule_finalize_tasks ()
 Destroys tasks marked for removal.
 

Variables

static task_pid_t current_task = 0
 the currently running task pid
 
static uint32_t ticks_per_time_slice = 1
 1 tick = frequency of the PIT