[][src]Module harsark::tasks

Kernel routines which assist in Task management.

Functions

create_task

Create a new task with the configuration set as arguments passed.

disable_preemption

Disable preemptive scheduling

enable_preemption

Enable preemptive scheduling

get_curr_tid

Returns the TaskId of the currently running task in the kernel.

init

Initializes the Kernel scheduler and creates the idle task, a task that puts the CPU to sleep in a loop. The idle task is created with zero priority; hence, it is only executed when no other task is in Ready state.

release

The Kernel releases the tasks in the task_mask, these tasks transition from the waiting to the ready state.

start_kernel

Starts the Kernel scheduler, which starts scheduling tasks on the CPU.

task_exit

The task_exit function is called just after a task finishes execution. It marks the current running task as finished and then schedules the next high priority task.