sof _ctx_alloc() followup: Remove the ctx_alloc.h header and move the implementation into rtos/alloc.h.#10831
Open
jsarha wants to merge 1 commit into
Open
sof _ctx_alloc() followup: Remove the ctx_alloc.h header and move the implementation into rtos/alloc.h.#10831jsarha wants to merge 1 commit into
jsarha wants to merge 1 commit into
Conversation
Remove the ctx_alloc.h header and move the implementation into rtos/alloc.h. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the dedicated sof/ctx_alloc.h header and relocates the mod_alloc_ctx + sof_ctx_{alloc,zalloc,free}() inline allocation helpers into rtos/alloc.h, updating various SOF headers/sources to stop including the removed header.
Changes:
- Deleted
src/include/sof/ctx_alloc.hand moved its contents intozephyr/include/rtos/alloc.h. - Removed now-obsolete
#include <sof/ctx_alloc.h>from several headers and sources. - Centralized ctx-based allocation helpers behind the RTOS allocation header (for Zephyr).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
zephyr/include/rtos/alloc.h |
Adds struct mod_alloc_ctx and sof_ctx_{alloc,zalloc,free}() inline helpers (moved from sof/ctx_alloc.h). |
src/include/sof/lib/dai-zephyr.h |
Drops sof/ctx_alloc.h include. |
src/include/sof/audio/component.h |
Drops sof/ctx_alloc.h include. |
src/audio/module_adapter/module/generic.c |
Drops sof/ctx_alloc.h include. |
src/audio/buffers/ring_buffer.c |
Drops sof/ctx_alloc.h include. |
src/audio/buffers/comp_buffer.c |
Drops sof/ctx_alloc.h include. |
src/include/sof/ctx_alloc.h |
Deleted (content moved to rtos/alloc.h). |
Comment on lines
+156
to
+160
| struct mod_alloc_ctx { | ||
| struct k_heap *heap; | ||
| struct vregion *vreg; | ||
| }; | ||
|
|
Comment on lines
+153
to
+154
| #include <sof/lib/vregion.h> | ||
| #include <string.h> |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove the ctx_alloc.h header and move the implementation into rtos/alloc.h.
Added based on this discussion:
#10802 (comment)
My revised version was just a little bit late and the old version was merged before I pushed the new one.