Module task

Source
Expand description

Multi-threading management.

Structs§

AxTaskHandlemultitask
A handle to a task.
AxWaitQueueHandlemultitask
A handle to a wait queue.

Functions§

ax_current_task_idmultitask
Returns the current task’s ID.
ax_exit
Exits the current task with the given exit code.
ax_set_current_affinitymultitask
Sets the cpu affinity of the current task.
ax_set_current_prioritymultitask
Sets the priority of the current task.
ax_sleep_until
Current task is going to sleep, it will be woken up at the given deadline.
ax_spawnmultitask
Spawns a new task with the given entry point and other arguments.
ax_wait_for_exitmultitask
Waits for the given task to exit, and returns its exit code (the argument of ax_exit).
ax_wait_queue_waitmultitask
Blocks the current task and put it into the wait queue, until other tasks notify the wait queue, or the the given duration has elapsed (if specified).
ax_wait_queue_wait_untilmultitask
Blocks 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_wakemultitask
Wakes up one or more tasks in the wait queue.
ax_yield_now
Current task gives up the CPU time voluntarily, and switches to another ready task.

Type Aliases§

AxCpuMaskmultitask
A mask to specify the CPU affinity. The wrapper type for [cpumask::CpuMask] with SMP configuration.