-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update taskYIELD_IF_USING_PREEMPTION macro #769
Update taskYIELD_IF_USING_PREEMPTION macro #769
Conversation
* taskYIELD_IF_USING_PREEMPTION is removed
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #769 +/- ##
==========================================
- Coverage 94.35% 94.35% -0.01%
==========================================
Files 6 6
Lines 2446 2443 -3
Branches 598 598
==========================================
- Hits 2308 2305 -3
Misses 85 85
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
See inline comment.
@RichardBarry This PR is updated. Would you like to review this PR again? |
The PR is updated as suggested.
Update
taskYIELD_IF_USING_PREEMPTION
to align single core and SMP implementation.Description
taskYIELD_IF_USING_PREEMPTION
is called in the following two scenarios in single core implementation:In single core implementation both of the scenarios is achieved by calling
portYIELD_WITHIN_API()
. However, these scenarios are handled differently in SMP.prvYieldCore()
is called when requesting a running task to yield andprvYieldForTask()
is called when yielding a running task for higher priority task.This PR tries to align these scenarios with the same macro in single core and SMP. A new macro
taskYIELD_ANY_CORE_IF_USING_PREEMPTION
is added. ExistingtaskYIELD_IF_USING_PREEMPTION
macro is renamed totaskYIELD_TASK_CORE_IF_USING_PREEMPTION
with one parameter.Single core implementation
SMP implementation
Checklist:
I have modified and/or added unit-tests to cover the code changes in this Pull Request.Related Issue
Address #750 comment in line 61.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.