Skip to content

Revert "schedule: zephyr_ll: convert pdata->sem into sys_sem"#11035

Open
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:syssem
Open

Revert "schedule: zephyr_ll: convert pdata->sem into sys_sem"#11035
lyakh wants to merge 1 commit into
thesofproject:mainfrom
lyakh:syssem

Conversation

@lyakh

@lyakh lyakh commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

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.

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ll back from struct sys_sem to struct k_sem.
  • Remove the POSIX no-op sys_sem shim 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.

Comment thread src/schedule/zephyr_ll.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants