Skip to content
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

Remove prvSelectHighestPriorityTask call in vTaskSuspend #610

Conversation

chinglee-iot
Copy link
Member

This PR extends the discussion in #607 to prevent uxTopReadyPriority decreased to -1 in the implementation.

Description

  • Every core starts with an idle task in SMP implementation and taskTASK_IS_RUNNING only return ture when the task is idle task before scheduler started. So prvSelectHighestPriorityTask won't be called in vTaskSuspend before scheduler started.
  • Update prvSelectHighestPriorityTask and also ensure that this function is called only when scheduler started.

Test Steps

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* Every core starts with an idle task in SMP implementation and
  taskTASK_IS_RUNNING only return ture when the task is idle task before
  scheduler started. So prvSelectHighestPriorityTask won't be called in
  vTaskSuspend before scheduler started.
* Update prvSelectHighestPriorityTask to ensure that this function is
  called only when scheduler started.
@chinglee-iot chinglee-iot requested a review from a team as a code owner January 12, 2023 07:54
@chinglee-iot chinglee-iot requested a review from ActoryOu January 12, 2023 07:54
@chinglee-iot chinglee-iot requested a review from aggarg January 12, 2023 07:59
@aggarg aggarg merged commit 0f9e6e5 into FreeRTOS:smp Jan 24, 2023
@chinglee-iot chinglee-iot deleted the fix-prvSelectHighestPriorityTask-in-vTaskSuspend branch February 9, 2023 06:41
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