Sound Open Firmware
Loading...
Searching...
No Matches
twb_schedule.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright(c) 2023 Intel Corporation. All rights reserved.
4 *
5 * Author: Adrian Bonislawski <adrian.bonislawski@intel.com>
6 */
7
8#ifndef __SOF_SCHEDULE_TWB_SCHEDULE_H__
9#define __SOF_SCHEDULE_TWB_SCHEDULE_H__
10
11#include <rtos/task.h>
12#include <stdint.h>
13
48
52#define ZEPHYR_TWB_STACK_SIZE 8192
53
57#define ZEPHYR_TWB_BUDGET_MAX (CONFIG_SYS_CLOCK_TICKS_PER_SEC / 1000)
58
59#define SYS_TICKS_TO_HW_CYCLES(x) (x * CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / CONFIG_SYS_CLOCK_TICKS_PER_SEC)
60#define HW_CYCLES_TO_SYS_TICKS(x) (x * CONFIG_SYS_CLOCK_TICKS_PER_SEC / CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC)
61
66
82 const struct sof_uuid_entry *uid,
83 const struct task_ops *ops,
84 void *data,
85 int32_t core,
86 const char *name,
87 size_t stack_size,
88 int32_t thread_priority,
89 uint32_t cycles_granted);
90
91#endif /* __SOF_SCHEDULE_TWB_SCHEDULE_H__ */
uint32_t data[]
Definition debug_stream_slot.h:2
Connects UUID with component description.
Definition uuid.h:77
Task operations.
Definition task.h:49
Task used by schedulers.
Definition task.h:56
int scheduler_twb_init(void)
Init the Tasks with Budget scheduler.
int scheduler_twb_task_init(struct task **task, const struct sof_uuid_entry *uid, const struct task_ops *ops, void *data, int32_t core, const char *name, size_t stack_size, int32_t thread_priority, uint32_t cycles_granted)
initialize a TWB task and add it to scheduling It must be called on core the task is declared to run ...