FreeRTOS / FreeRTOS-Kernel

FreeRTOS kernel files only, submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
https://www.FreeRTOS.org
MIT License
2.76k stars 1.12k forks source link

Update SMP get idle task memory for static allocation #784

Closed chinglee-iot closed 1 year ago

chinglee-iot commented 1 year ago

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 https://github.com/FreeRTOS/FreeRTOS/pull/1096 FreeRTOS-Kernel Demos / GNU ARM Toolchain (pull_request) : fixed in https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/pull/13

Test Steps

Checklist:

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.

codecov[bot] commented 1 year ago

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 ```diff @@ 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](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/784/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/784/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS) | `93.60% <94.44%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/784?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS) | Coverage Δ | | |---|---|---| | [tasks.c](https://app.codecov.io/gh/FreeRTOS/FreeRTOS-Kernel/pull/784?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=FreeRTOS#diff-dGFza3MuYw==) | `94.75% <94.44%> (-0.07%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

chinglee-iot commented 1 year ago

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.

sonarcloud[bot] commented 1 year ago

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