# Module os::task::processor

source · [−]
Expand description

Implementation of `Processor` and Intersection of control flow

## Structs

PROCESSOR
Processor

Processor management structure

## Functions

current_task

Get running task

current_trap_cx

Get the mutable reference to trap context of current task

current_user_token

Get token of the address space of current task

run_tasks

The main part of process execution and scheduling Loop `fetch_task` to get the process that needs to run, and switch the process through `__switch`

schedule

Return to idle control flow for new scheduling

take_current_task

Take the current task,leaving a None in its place