Module arceos_api::task
source · Expand description
Multi-threading management.
Structs§
- AxTaskHandle
multitaskA handle to a task. - AxWaitQueueHandle
multitaskA handle to a wait queue.
Functions§
- ax_current_task_id
multitaskReturns the current task’s ID. - Exits the current task with the given exit code.
- ax_set_current_priority
multitaskSets the priority of the current task. - Current task is going to sleep, it will be woken up at the given deadline.
- ax_spawn
multitaskSpawns a new task with the given entry point and other arguments. - ax_wait_for_exit
multitaskWaits for the given task to exit, and returns its exit code (the argument ofax_exit). - ax_wait_queue_wait
multitaskBlocks the current task and put it into the wait queue, until the given condition becomes true, or the the given duration has elapsed (if specified). - ax_wait_queue_wake
multitaskWakes up one or more tasks in the wait queue. - Current task gives up the CPU time voluntarily, and switches to another ready task.