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

Yield for task when core affinity of a ready task is changed #1123

Merged

Conversation

chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Aug 19, 2024

Description

Address the issue #1086

In this PR:

  • The SMP scheduler re-select a core to yield when the core affinity of a ready task is changed.

Test Steps

Running the unit test in this PR should has no error.

The test case test_task_create_task_set_affinity_async_yield.

/mnt/c/msys64/home/chinglee/kernel/oncall/affinity/FreeRTOS/FreeRTOS/Test/CMock/build/bin/smp_multiple_priorities_no_timeslice_multiple_priorities_no_timeslice_utest /mnt/c/msys64/home/chinglee/kernel/oncall/affinity/FreeRTOS/FreeRTOS/Test/CMock/build/bin/smp_multiple_priorities_no_timeslice_covg_multiple_priorities_no_timeslice_utest
...
/mnt/c/msys64/home/chinglee/kernel/oncall/affinity/FreeRTOS/FreeRTOS/Test/CMock/smp/multiple_priorities_no_timeslice/multiple_priorities_no_timeslice_utest.c:3548:test_task_create_task_set_affinity_async_yield:PASS

-----------------------
44 Tests 0 Failures 0 Ignored

Checklist:

Related Issue

#1086

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

@chinglee-iot chinglee-iot requested a review from a team as a code owner August 19, 2024 10:01
* The SMP scheduler should reselect a core to yield when the core
  affinity of a ready task is changed.
@chinglee-iot chinglee-iot force-pushed the fix-set-core-affinity-ready-state branch from 8e5ca91 to e9ffb2f Compare August 19, 2024 10:06
Copy link

sonarcloud bot commented Aug 19, 2024

@chinglee-iot chinglee-iot merged commit e43553a into FreeRTOS:main Aug 20, 2024
16 checks passed
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