-
Notifications
You must be signed in to change notification settings - Fork 349
DP: Fork "native" and "proxy" versions (part 4.1 of #10287) #10398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* SPDX-License-Identifier: BSD-3-Clause */ | ||
| /* | ||
| * Copyright(c) 2023 Intel Corporation. All rights reserved. | ||
| * | ||
| * Author: Marcin Szkudlinski | ||
| */ | ||
|
|
||
| #include <rtos/task.h> | ||
| #include <sof/audio/module_adapter/module/generic.h> | ||
| #include <sof/list.h> | ||
| #include <sof/compiler_attributes.h> | ||
|
|
||
| #include <stdbool.h> | ||
| #include <stdint.h> | ||
|
|
||
| struct scheduler_dp_data { | ||
| struct list_item tasks; /* list of active dp tasks */ | ||
| struct task ll_tick_src; /* LL task - source of DP tick */ | ||
| uint32_t last_ll_tick_timestamp;/* a timestamp as k_cycle_get_32 of last LL tick, | ||
| * "NOW" for DP deadline calculation | ||
| */ | ||
|
|
||
| }; | ||
|
|
||
| struct task_dp_pdata { | ||
| k_tid_t thread_id; /* zephyr thread ID */ | ||
| struct k_thread *thread; /* pointer to the kernels' thread object */ | ||
| struct k_thread thread_struct; /* thread object for kernel threads */ | ||
| uint32_t deadline_clock_ticks; /* dp module deadline in Zephyr ticks */ | ||
| k_thread_stack_t __sparse_cache *p_stack; /* pointer to thread stack */ | ||
| size_t stack_size; /* size of the stack in bytes */ | ||
| struct k_sem *sem; /* pointer to semaphore for task scheduling */ | ||
| struct k_sem sem_struct; /* semaphore for task scheduling for kernel threads */ | ||
| struct processing_module *mod; /* the module to be scheduled */ | ||
| uint32_t ll_cycles_to_start; /* current number of LL cycles till delayed start */ | ||
| }; | ||
|
|
||
| void scheduler_dp_recalculate(struct scheduler_dp_data *dp_sch, bool is_ll_post_run); | ||
| void dp_thread_fn(void *p1, void *p2, void *p3); | ||
| unsigned int scheduler_dp_lock(uint16_t core); | ||
| void scheduler_dp_unlock(unsigned int key); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing header guards. This header file should include preprocessor guards (e.g.,
#ifndef ZEPHYR_DP_SCHEDULE_H,#define ZEPHYR_DP_SCHEDULE_H, and#endif) to prevent multiple inclusion.