forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathll_schedule.h
More file actions
57 lines (43 loc) · 1.6 KB
/
ll_schedule.h
File metadata and controls
57 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
/*
* Delayed or scheduled work. Work runs in the same context as it's timer
* interrupt source. It should execute quickly and must not sleep or wait.
*/
#ifndef __SOF_SCHEDULE_LL_SCHEDULE_H__
#define __SOF_SCHEDULE_LL_SCHEDULE_H__
#include <rtos/task.h>
#include <sof/trace/trace.h>
#include <user/trace.h>
#include <stdint.h>
struct ll_schedule_domain;
/* ll tracing */
extern struct tr_ctx ll_tr;
#define ll_sch_set_pdata(task, data) \
do { (task)->priv_data = (data); } while (0)
#define ll_sch_get_pdata(task) ((task)->priv_data)
struct ll_task_pdata {
uint64_t period;
uint16_t ratio; /**< ratio of periods compared to the registrable task */
uint16_t skip_cnt; /**< how many times the task was skipped for execution */
};
#if !defined(__ZEPHYR__)
int scheduler_init_ll(struct ll_schedule_domain *domain);
int schedule_task_init_ll(struct task *task,
const struct sof_uuid_entry *uid, uint16_t type,
uint16_t priority, enum task_state (*run)(void *data),
void *data, uint16_t core, uint32_t flags);
#else
int zephyr_ll_scheduler_init(struct ll_schedule_domain *domain);
int zephyr_ll_task_init(struct task *task,
const struct sof_uuid_entry *uid, uint16_t type,
uint16_t priority, enum task_state (*run)(void *data),
void *data, uint16_t core, uint32_t flags);
#define scheduler_init_ll zephyr_ll_scheduler_init
#define schedule_task_init_ll zephyr_ll_task_init
#endif
#endif /* __SOF_SCHEDULE_LL_SCHEDULE_H__ */