Skip to content

Conversation

@chinglee-iot
Copy link
Member

@chinglee-iot chinglee-iot commented Sep 4, 2023

Description

Add configUSE_CORE_AFFINITY bits check

  • UBaseType_t should have more bits than configNUMBER_OF_CORES
  • Single core FreeRTOS should set this macro to 0

Test Steps

There will be compilation error with the following configurations:

  • configNUMBER_OF_CORES = 1
  • configUSE_CORE_AFFINITY = 1
In file included from C:/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Demo/Common/Minimal/IntSemTest.c:36:
C:/msys64/home/chinglee/kernel/init_review/test/FreeRTOS/FreeRTOS/Source/include/FreeRTOS.h:1169:6: error: #error configUSE_CORE_AFFINITY is not supported in single core FreeRTOS
 1169 |     #error configUSE_CORE_AFFINITY is not supported in single core FreeRTOS
      |      ^~~~~
ninja: build stopped: subcommand failed.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

Address #750 comment in line 307

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 September 4, 2023 10:02
@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c93d386) 94.35% compared to head (f6826c8) 94.35%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #776   +/-   ##
=======================================
  Coverage   94.35%   94.35%           
=======================================
  Files           6        6           
  Lines        2446     2446           
  Branches      598      598           
=======================================
  Hits         2308     2308           
  Misses         85       85           
  Partials       53       53           
Flag Coverage Δ
unittests 94.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
tasks.c 94.83% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ActoryOu
ActoryOu previously approved these changes Sep 6, 2023
@chinglee-iot chinglee-iot merged commit f7565c2 into FreeRTOS:main Sep 6, 2023
@chinglee-iot chinglee-iot deleted the add-core-affinity-bits-check branch September 6, 2023 11:09
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