DP: application: switch back to events#10568
Open
lyakh wants to merge 1 commit intothesofproject:mainfrom
Open
DP: application: switch back to events#10568lyakh wants to merge 1 commit intothesofproject:mainfrom
lyakh wants to merge 1 commit intothesofproject:mainfrom
Conversation
Events provide a more natural API when the listener have to wait for several kinds of alarms at once. As the userspace code stabilises initial difficulties with the API got fixed. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
There was a problem hiding this comment.
Pull request overview
This PR transitions the DP scheduler application from using semaphores to using events for task synchronization, providing a more natural API for handling multiple alarm types. The change removes the counting mechanism for pending IPC and processing events in favor of event flags.
Changes:
- Replaced semaphore-based synchronization with event-based synchronization
- Removed
pend_ipcandpend_proccounters in favor of event flags - Simplified thread wake-up logic by using
k_event_wait_safe()with combined event flags
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/schedule/zephyr_dp_schedule_application.c | Converted IPC and processing triggers from semaphore to events, simplified thread wait logic |
| src/schedule/zephyr_dp_schedule.h | Updated task data structure to use events for both userspace and kernel configurations |
| src/schedule/zephyr_dp_schedule.c | Unified task stop mechanism to use events for all configurations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Events provide a more natural API when the listener have to wait for several kinds of alarms at once. As the userspace code stabilises initial difficulties with the API got fixed.