Sound Open Firmware
Loading...
Searching...
No Matches
ll_schedule.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2016 Intel Corporation. All rights reserved.
4 *
5 * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
6 */
7
8/*
9 * Delayed or scheduled work. Work runs in the same context as it's timer
10 * interrupt source. It should execute quickly and must not sleep or wait.
11 */
12
13#ifndef __SOF_SCHEDULE_LL_SCHEDULE_H__
14#define __SOF_SCHEDULE_LL_SCHEDULE_H__
15
16#include <rtos/task.h>
17#include <sof/trace/trace.h>
18#include <user/trace.h>
19#include <stdint.h>
20#include <ipc4/base_fw.h>
21
23
24/* ll tracing */
25extern struct tr_ctx ll_tr;
26
27#define ll_sch_set_pdata(task, data) \
28 do { (task)->priv_data = (data); } while (0)
29
30#define ll_sch_get_pdata(task) ((task)->priv_data)
31
33 uint64_t period;
34 uint16_t ratio;
35 uint16_t skip_cnt;
36};
37
38#if !defined(__ZEPHYR__)
40
42 const struct sof_uuid_entry *uid, uint16_t type,
43 int16_t priority, enum task_state (*run)(void *data),
44 void *data, uint16_t core, uint32_t flags);
45#else
46int zephyr_ll_scheduler_init(struct ll_schedule_domain *domain);
47
48int zephyr_ll_task_init(struct task *task,
49 const struct sof_uuid_entry *uid, uint16_t type,
50 int16_t priority, enum task_state (*run)(void *data),
51 void *data, uint16_t core, uint32_t flags);
52
53#define scheduler_init_ll zephyr_ll_scheduler_init
54#define schedule_task_init_ll zephyr_ll_task_init
55
56#endif
57
64void scheduler_get_task_info_ll(struct scheduler_props *scheduler_props,
65 uint32_t *data_off_size);
66
67#endif /* __SOF_SCHEDULE_LL_SCHEDULE_H__ */
uint32_t data[]
Definition debug_stream_slot.h:2
struct tr_ctx ll_tr
void scheduler_get_task_info_ll(struct scheduler_props *scheduler_props, uint32_t *data_off_size)
Extract information about scheduler's tasks.
int schedule_task_init_ll(struct task *task, const struct sof_uuid_entry *uid, uint16_t type, int16_t priority, enum task_state(*run)(void *data), void *data, uint16_t core, uint32_t flags)
int scheduler_init_ll(struct ll_schedule_domain *domain)
Definition ll_schedule_domain.h:84
Definition ll_schedule.h:32
uint16_t ratio
ratio of periods compared to the registrable task
Definition ll_schedule.h:34
uint16_t skip_cnt
how many times the task was skipped for execution
Definition ll_schedule.h:35
uint64_t period
Definition ll_schedule.h:33
Connects UUID with component description.
Definition uuid.h:77
Task used by schedulers.
Definition task.h:56
Definition trace.h:135
task_state
Task states.
Definition task.h:36
uint32_t type
Definition tlv.h:0