Revert "schedule: zephyr_ll: convert pdata->sem into sys_sem"#11035
Open
lyakh wants to merge 1 commit into
Open
Revert "schedule: zephyr_ll: convert pdata->sem into sys_sem"#11035lyakh wants to merge 1 commit into
lyakh wants to merge 1 commit into
Conversation
This reverts commit 48cdc4d. struct sys_sem cannot be on heap and we can have many LL tasks so using a statically allocated pool of them doesn't look like a good idea either. Using k_sem is slower, but so far there don't seem to be good alternatives to that. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
lyakh
requested review from
LaurentiuM1234,
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
marcinszkudlinski,
mmaka1,
pblaszko and
plbossart
as code owners
July 24, 2026 12:29
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts a prior change in the Zephyr LL scheduler that replaced per-task semaphores with sys_sem, after discovering struct sys_sem cannot be heap-allocated and the scheduler may need many per-task instances.
Changes:
- Switch per-task synchronization in
zephyr_llback fromstruct sys_semtostruct k_sem. - Remove the POSIX no-op
sys_semshim previously added to support the reverted implementation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/schedule/zephyr_ll.c | Reverts per-task semaphore type and APIs from sys_sem_* back to k_sem_*. |
| posix/include/rtos/mutex.h | Drops the sys_sem no-op shim that was only needed for the reverted change. |
lgirdwood
approved these changes
Jul 24, 2026
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.
This reverts commit 48cdc4d. struct sys_sem cannot be on heap and we can have many LL tasks so using a statically allocated pool of them doesn't look like a good idea either. Using k_sem is slower, but so far there don't seem to be good alternatives to that.