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

Update SMP get idle task memory for static allocation #784

Merged
merged 26 commits into from
Oct 12, 2023

Conversation

chinglee-iot
Copy link
Member

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

Add static idle task memory support for SMP

Description

In the FreeRTOS SMP, configNUMBER_OF_CORES - 1 idle tasks which do the minimal job are also created to ensure that each core has an idle task to run when no other task is available to run. The prototype of vApplicationGetIdleTaskMemory() is changed in SMP to specify the idle task memory.

void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
                                    StackType_t ** ppxIdleTaskStackBuffer,
                                    uint32_t * pulIdleTaskStackSize,
                                    BaseType_t xCoreID );

Set xCoreID to 0 to specify the idle task memory for the active idle task. Set xCoreID to 1 ~ ( configNUMBER_OF_CORES - 1 ) to specify the idle task memory for a passive idle task which does the minimal job.

codecov/project : fixed in FreeRTOS/FreeRTOS#1096
FreeRTOS-Kernel Demos / GNU ARM Toolchain (pull_request) : fixed in FreeRTOS/FreeRTOS-Community-Supported-Demos#13

Test Steps

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 469

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 7, 2023 08:30
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (92a4d17) 93.62% compared to head (9989e0b) 93.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #784      +/-   ##
==========================================
- Coverage   93.62%   93.60%   -0.02%     
==========================================
  Files           6        6              
  Lines        2508     2517       +9     
  Branches      598      602       +4     
==========================================
+ Hits         2348     2356       +8     
  Misses        107      107              
- Partials       53       54       +1     
Flag Coverage Δ
unittests 93.60% <94.44%> (-0.02%) ⬇️

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

Files Coverage Δ
tasks.c 94.75% <94.44%> (-0.07%) ⬇️

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

@chinglee-iot chinglee-iot changed the title Update smp idle task memory Update SMP get idle task memory for static allocation Sep 9, 2023
ActoryOu
ActoryOu previously approved these changes Sep 12, 2023
* Rename vApplicationMinimalIdleTask to vApplicationPassiveIdleTask
* Rename the macro configUSE_MINIMAL_IDLE_HOOK to
  configUSE_PASSIVE_IDLE_HOOK
* Update xTaskGetIdleTaskHandle for SMP
include/task.h Outdated Show resolved Hide resolved
include/task.h Outdated Show resolved Hide resolved
@chinglee-iot
Copy link
Member Author

This pull request in FreeRTOS-Community-Supported-Demos fixes the FreeRTOS-Kernel-Demos / GNU ARM Toolchain failure. It will be merged after this kernel PR is merged.

chinglee-iot and others added 2 commits September 28, 2023 13:49
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

4 participants