Sound Open Firmware
Loading...
Searching...
No Matches

Core task descriptor, task operations, and task execution state machine. More...

Include dependency graph for task.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  task_ops
 Operations and callbacks associated with a scheduling task. More...
 
struct  task
 Core task structure managed by SOF schedulers. More...
 

Macros

#define SOF_TASK_PRI_HIGH   0
 Predefined Low-Latency task priority levels.
 
#define SOF_TASK_PRI_MED   4
 Priority level 4 - medium.
 
#define SOF_TASK_PRI_LOW   9
 Priority level 9 - low (background/idle).
 
#define SOF_TASK_DEADLINE_IDLE   UINT64_MAX
 Predefined EDF task deadlines.
 
#define SOF_TASK_DEADLINE_ALMOST_IDLE   (SOF_TASK_DEADLINE_IDLE - 1)
 Almost idle deadline.
 
#define SOF_TASK_DEADLINE_NOW   0
 Immediate deadline; run as soon as possible.
 
#define SOF_TASK_SKIP_COUNT   0xFFFFu
 Task counter initial value.
 

Enumerations

enum  task_state {
  SOF_TASK_STATE_INIT = 0 , SOF_TASK_STATE_QUEUED , SOF_TASK_STATE_PENDING , SOF_TASK_STATE_RUNNING ,
  SOF_TASK_STATE_PREEMPTED , SOF_TASK_STATE_COMPLETED , SOF_TASK_STATE_FREE , SOF_TASK_STATE_CANCEL ,
  SOF_TASK_STATE_RESCHEDULE
}
 Lifecycle and execution states of an SOF task. More...
 

Functions

static bool task_is_active (struct task *task)
 Check whether a task is active (queued, running, pending, or rescheduling).
 
static enum task_state task_run (struct task *task)
 Execute a task's run callback.
 
static void task_complete (struct task *task)
 Execute a task's complete callback, if registered.
 
static uint64_t task_get_deadline (struct task *task)
 Retrieve a task's deadline timestamp.
 
int task_main_start (struct sof *sof)
 Start the main SOF background task.
 
int start_complete (void)
 Signal completion of system startup.
 

Detailed Description

Core task descriptor, task operations, and task execution state machine.