|
Sound Open Firmware
|
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. | |
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.
Reschedules already scheduled task with new start time.
| data | Private data of selected scheduler. |
| task | Task to be rescheduled. |
| start | New start time of given task (in microseconds). |
This operation is optional.
| int(* scheduler_ops::schedule_task) (void *data, struct task *task, uint64_t start, uint64_t period) |
Schedules task with given scheduling parameters.
| data | Private data of selected scheduler. |
| task | Task to be scheduled. |
| start | Start time of given task (in microseconds). |
| period | Scheduling period of given task (in microseconds). |
This operation is mandatory.
| 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.
| data | Private data of selected scheduler. |
| task | Task to be scheduled. |
| start | Start time of given task (in microseconds). |
| period | Scheduling period of given task (in microseconds). |
| after | Task to be scheduled after |
This operation is optional.
| 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.
| data | Private data of selected scheduler. |
| task | Task to be scheduled. |
| start | Start time of given task (in microseconds). |
| period | Scheduling period of given task (in microseconds). |
| before | Task to be scheduled before |
This operation is optional.
Cancels previously scheduled task.
| data | Private data of selected scheduler. |
| task | Task to be canceled. |
This operation is mandatory.
Frees task's resources.
| data | Private data of selected scheduler. |
| task | Task to be freed. |
This operation is mandatory.
Sets task into running state along with executing additional scheduler specific operations.
| data | Private data of selected scheduler. |
| task | Task to be set into running state. |
This operation is optional.
Initializes context.
| data | Private data of selected scheduler. |
| task | task that needs to be scheduled |
This operation is optional.