Module task

Source
Expand description

Task management implementation

Everything about task management, like starting and switching tasks is implemented here.

A single global instance of TaskManager called TASK_MANAGER controls all the tasks in the operating system.

Be careful when you see __switch ASM function in switch.S. Control flow around this function might not be what you expect.

Modulesยง

context ๐Ÿ”’
Implementation of TaskContext
switch ๐Ÿ”’
Rust wrapper around __switch.
task ๐Ÿ”’
Types related to task management

Structsยง

TASK_MANAGER
Global variable: TASK_MANAGER
TaskContext
Task Context
TaskManager
The task manager, where all the tasks are managed.
TaskManagerInner
Inner of Task Manager

Functionsยง

exit_current_and_run_next
exit current task, then run next task
mark_current_exited ๐Ÿ”’
exit current task
mark_current_suspended ๐Ÿ”’
suspend current task
run_first_task
run first task
run_next_task ๐Ÿ”’
rust next task
suspend_current_and_run_next
suspend current task, then run next task