Module os::task

source ·
Expand description

Implementation of process ProcessControlBlock and task(thread) TaskControlBlock management mechanism

Here is the entry for task scheduling required by other modules (such as syscall or clock interrupt). By suspending or exiting the current task, you can modify the task state, manage the task queue through TASK_MANAGER (in task/manager.rs) , and switch the control flow through PROCESSOR (in task/processor.rs) .

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

Modules§

  • context 🔒
    Implementation of TaskContext
  • id 🔒
    Allocator for pid, task user resource, kernel stack using a simple recycle strategy.
  • manager 🔒
    Implementation of TaskManager
  • process 🔒
    Implementation of ProcessControlBlock
  • processor 🔒
    Implementation of Processor and Intersection of control flow
  • signal 🔒
    Signal flags and function for convert signal flag to integer & string
  • switch 🔒
    provides __switch asm function to switch between two task contexts TaskContext
  • task 🔒
    Types related to task management & Functions for completely changing TCB

Structs§

Enums§

  • The execution status of the current process

Constants§

Functions§