Sound Open Firmware
Loading...
Searching...
No Matches
scheduler_ops Struct Reference

Scheduler operations. More...

#include <schedule.h>

Data Fields

int(* schedule_task )(void *data, struct task *task, uint64_t start, uint64_t period)
 Schedules task with given scheduling parameters.
int(* schedule_task_before )(void *data, struct task *task, uint64_t start, uint64_t period, struct task *before)
 Schedules task with given scheduling parameters.
int(* schedule_task_after )(void *data, struct task *task, uint64_t start, uint64_t period, struct task *after)
 Schedules task with given scheduling parameters.
int(* schedule_task_running )(void *data, struct task *task)
 Sets task into running state along with executing additional scheduler specific operations.
int(* reschedule_task )(void *data, struct task *task, uint64_t start)
 Reschedules already scheduled task with new start time.
int(* schedule_task_cancel )(void *data, struct task *task)
 Cancels previously scheduled task.
int(* schedule_task_free )(void *data, struct task *task)
 Frees task's resources.
struct k_thread *(* scheduler_init_context )(void *data, struct task *task)
 Initializes context.

Detailed Description

Scheduler operations.

Almost all schedule operations must return 0 for success and negative values for errors. Only the scheduler_free operation is allowed to not return any status.

Field Documentation

◆ reschedule_task

int(* scheduler_ops::reschedule_task) (void *data, struct task *task, uint64_t start)

Reschedules already scheduled task with new start time.

Parameters
dataPrivate data of selected scheduler.
taskTask to be rescheduled.
startNew start time of given task (in microseconds).
Returns
0 if succeeded, error code otherwise.

This operation is optional.

◆ schedule_task

int(* scheduler_ops::schedule_task) (void *data, struct task *task, uint64_t start, uint64_t period)

Schedules task with given scheduling parameters.

Parameters
dataPrivate data of selected scheduler.
taskTask to be scheduled.
startStart time of given task (in microseconds).
periodScheduling period of given task (in microseconds).
Returns
0 if succeeded, error code otherwise.

This operation is mandatory.

◆ schedule_task_after

int(* scheduler_ops::schedule_task_after) (void *data, struct task *task, uint64_t start, uint64_t period, struct task *after)

Schedules task with given scheduling parameters.

Parameters
dataPrivate data of selected scheduler.
taskTask to be scheduled.
startStart time of given task (in microseconds).
periodScheduling period of given task (in microseconds).
afterTask to be scheduled after
Returns
0 if succeeded, error code otherwise.

This operation is optional.

◆ schedule_task_before

int(* scheduler_ops::schedule_task_before) (void *data, struct task *task, uint64_t start, uint64_t period, struct task *before)

Schedules task with given scheduling parameters.

Parameters
dataPrivate data of selected scheduler.
taskTask to be scheduled.
startStart time of given task (in microseconds).
periodScheduling period of given task (in microseconds).
beforeTask to be scheduled before
Returns
0 if succeeded, error code otherwise.

This operation is optional.

◆ schedule_task_cancel

int(* scheduler_ops::schedule_task_cancel) (void *data, struct task *task)

Cancels previously scheduled task.

Parameters
dataPrivate data of selected scheduler.
taskTask to be canceled.
Returns
0 if succeeded, error code otherwise.

This operation is mandatory.

◆ schedule_task_free

int(* scheduler_ops::schedule_task_free) (void *data, struct task *task)

Frees task's resources.

Parameters
dataPrivate data of selected scheduler.
taskTask to be freed.
Returns
0 if succeeded, error code otherwise.

This operation is mandatory.

◆ schedule_task_running

int(* scheduler_ops::schedule_task_running) (void *data, struct task *task)

Sets task into running state along with executing additional scheduler specific operations.

Parameters
dataPrivate data of selected scheduler.
taskTask to be set into running state.
Returns
0 if succeeded, error code otherwise.

This operation is optional.

◆ scheduler_init_context

struct k_thread *(* scheduler_ops::scheduler_init_context) (void *data, struct task *task)

Initializes context.

Parameters
dataPrivate data of selected scheduler.
tasktask that needs to be scheduled
Returns
thread that will be used to run the scheduled task

This operation is optional.


The documentation for this struct was generated from the following file:
  • /home/lrg/work/sof-dox-work/src/include/sof/schedule/schedule.h