]> begriffs open source - freertos/log
freertos
2 years agoAdd portMEMORY_BARRIER() to RX MCU ports (#864)
Soren Ptak [Wed, 29 Nov 2023 10:22:16 +0000 (05:22 -0500)]
Add portMEMORY_BARRIER() to RX MCU ports (#864)

* Add portMEMORY_BARRIER() to RX MCU ports

* Remove the memory barrier from the SH2A_FPU portable directory

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2 years agoUpgrade msvc port to winsock2 (#895)
Soren Ptak [Tue, 28 Nov 2023 20:16:16 +0000 (15:16 -0500)]
Upgrade msvc port to winsock2 (#895)

* Add the changes needed to the MSVC windows port to get it to build with winsock2.h
* Rely upon the WIN32_LEAN_AND_MEAN define to include winsock2.h

2 years agoRevert Portable/Renesas formatting (#876)
Soren Ptak [Tue, 28 Nov 2023 18:56:15 +0000 (13:56 -0500)]
Revert Portable/Renesas formatting (#876)

* Revert the formatting on Renesas ports

2 years agoCoverity Report Directory Fix (#909)
Rahul Kar [Tue, 28 Nov 2023 13:46:15 +0000 (19:16 +0530)]
Coverity Report Directory Fix (#909)

* Revert "The curl command to send the report expects the tar file to be in its current directory. The step either needed to have the working-directory: set to the build directory, or the tar file needs to be created in the parent directory. (#903)"

This reverts commit 76f3aa5b05e5c38e423e83eea23f5b34c15d3316.

* Update to separate build and upload steps

---------

Co-authored-by: tony-josi-aws <tonyjosi@amazon.com>
2 years agoSuppress MISRA C rule 11.3 in MISRA.md (#857)
chinglee-iot [Tue, 28 Nov 2023 13:34:29 +0000 (21:34 +0800)]
Suppress MISRA C rule 11.3 in MISRA.md (#857)

Suppress MISRA C rule 11.3 in MISRA.md

2 years agoFix MISRA 2012 Rule 10.8 violation (#853)
chinglee-iot [Tue, 28 Nov 2023 11:34:13 +0000 (19:34 +0800)]
Fix MISRA 2012 Rule 10.8 violation (#853)

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoFix MISRA 2012 rule 10.4 violations (#852)
chinglee-iot [Tue, 28 Nov 2023 11:21:03 +0000 (19:21 +0800)]
Fix MISRA 2012 rule 10.4 violations (#852)

Fix MISRA 2012 rule 10.4 violations

2 years agoFix MISRA C 2012 Rule 10.3 errors (#860)
chinglee-iot [Tue, 28 Nov 2023 05:29:07 +0000 (13:29 +0800)]
Fix MISRA C 2012 Rule 10.3 errors (#860)

* The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category.
---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoThe curl command to send the report expects the tar file to be in its current directo...
Soren Ptak [Tue, 28 Nov 2023 05:08:57 +0000 (00:08 -0500)]
The curl command to send the report expects the tar file to be in its current directory. The step either needed to have the working-directory: set to the build directory, or the tar file needs to be created in the parent directory. (#903)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoCoverity scan and upload in single step (#902)
Tony Josi [Mon, 27 Nov 2023 03:50:41 +0000 (09:20 +0530)]
Coverity scan and upload in single step (#902)

2 years agoNot to use object modified in the loop body (#861)
chinglee-iot [Fri, 24 Nov 2023 06:08:34 +0000 (14:08 +0800)]
Not to use object modified in the loop body (#861)

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoCoverity Scan Workflow Fix (#891)
Soren Ptak [Thu, 23 Nov 2023 16:47:31 +0000 (08:47 -0800)]
Coverity Scan Workflow Fix (#891)

Currently the Coverity Scan attempts to run on every fork that pulls
the file. This leads to anybody who pulls this file getting emails that
their workflow failed to run when the cron job attempts to run. This
PR sets the scan to only run if the repo is FreeRTOS/FreeRTOS-Kernel.
Also, change the scan from a cron job to a job that runs on a commit
to mainline, or if triggered manually.

2 years agoRevert Portable/WizC Formatting (#888)
Soren Ptak [Thu, 23 Nov 2023 12:04:07 +0000 (04:04 -0800)]
Revert Portable/WizC Formatting (#888)

* Revert formatting on WizC ports

* Fix spelling mistakes

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert formatting on Tasking ports (#887)
Soren Ptak [Thu, 23 Nov 2023 11:51:23 +0000 (03:51 -0800)]
Revert formatting on Tasking ports (#887)

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert Portable/Softune Formatting (#886)
Soren Ptak [Thu, 23 Nov 2023 11:39:28 +0000 (03:39 -0800)]
Revert Portable/Softune Formatting (#886)

* Revert formatting on Softune ports

* Fix spelling mistakes

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert formatting on SDCC ports (#885)
Soren Ptak [Thu, 23 Nov 2023 11:14:36 +0000 (03:14 -0800)]
Revert formatting on SDCC ports (#885)

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert formatting on Rowley ports (#884)
Soren Ptak [Thu, 23 Nov 2023 10:53:55 +0000 (02:53 -0800)]
Revert formatting on Rowley ports (#884)

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert Portable/MPLAB Formatting (#883)
Soren Ptak [Thu, 23 Nov 2023 10:29:40 +0000 (02:29 -0800)]
Revert Portable/MPLAB Formatting (#883)

* Revert the formatting PR

* Fix spelling mistakes

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert the formatting changes on MikroC ports. (#882)
Soren Ptak [Thu, 23 Nov 2023 10:20:15 +0000 (02:20 -0800)]
Revert the formatting changes on MikroC ports. (#882)

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRevert formatting on CCS port files (#881)
Soren Ptak [Thu, 23 Nov 2023 10:09:09 +0000 (02:09 -0800)]
Revert formatting on CCS port files (#881)

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoUpdate system call entry mechanism (#898)
Gaurav-Aggarwal-AWS [Thu, 23 Nov 2023 05:17:47 +0000 (10:47 +0530)]
Update system call entry mechanism (#898)

Earlier the System Call entry from an unprivileged task
looked like:

1. SVC for entering system call.
2. System call implementation.
3. SVC for exiting system call.

Now, the system call entry needs to make only one SVC
call and everything else is handled internally.

This PR also makes the following changes:

1. Update the Access Control List (ACL) mechanism to
    grant access to all the kernel objects before the
    scheduler is started.
2. Add one struct param for system calls with 5 parameters.
    This removes the need for special handling for system
    calls with 5 parameters.
3. Remove raise privilege SVC when MPU wrapper v2 is used.
4. Add additional run time parameter checks to MPU wrappers
    for xTaskGenericNotify and xQueueTakeMutexRecursive APIs.

2 years agofix IAR/CM0/portmacro.h missing semicolon (#894)
Ha Thach [Sat, 18 Nov 2023 08:01:50 +0000 (15:01 +0700)]
fix IAR/CM0/portmacro.h missing semicolon (#894)

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2 years agoIn smp, every core has a idle task. (#893)
Moral-Hao [Thu, 16 Nov 2023 19:53:27 +0000 (03:53 +0800)]
In smp, every core has a idle task. (#893)

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
2 years agoAdd vApplicationGetPassiveIdleTaskMemory for SMP (#890)
chinglee-iot [Thu, 16 Nov 2023 01:04:05 +0000 (09:04 +0800)]
Add vApplicationGetPassiveIdleTaskMemory for SMP (#890)

* Update vApplicationGetIdleTaskMemory prototype for SMP. Now SMP and
  single core use the same prototype for compatibility.
* Add vApplicationGetPassiveIdleTaskMemory for SMP to get passive idle
  task memory.

2 years agoCI-CD URL Check Change (#880)
Soren Ptak [Thu, 9 Nov 2023 23:00:06 +0000 (15:00 -0800)]
CI-CD URL Check Change (#880)

* Remove the Kernel's custom URL check to just use the CI-CD Actions one
* Exclude portable directory from formatting check.

2 years agoAdd time conversion macros (#866) 762/head
Darian [Wed, 8 Nov 2023 05:34:53 +0000 (13:34 +0800)]
Add time conversion macros (#866)

This commit updates the following time conversion macros:

- pdMS_TO_TICKS: Added cast to "uint64_t" to prevent overflow
- pdTICKS_TO_MS: Added macro to convert ticks to milliseconds

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2 years agoDistinguish waiting for notify status from suspend status (#865)
Moral-Hao [Tue, 7 Nov 2023 07:33:07 +0000 (15:33 +0800)]
Distinguish waiting for notify status from suspend status (#865)

* Fix prvTaskIsTaskSuspended.

Just like eTaskGetState, distinguish waiting for notify from suspend.

* Fix vTaskGetInfo.

Just like eTaskGetState, distinguish block state (waiting on notification)
from suspend state.

* Add missing definition of variable x.

* Fix formatting syntax.

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2 years agoFix vTaskSwitchContext for smp. (#879)
Moral-Hao [Mon, 6 Nov 2023 09:50:32 +0000 (17:50 +0800)]
Fix vTaskSwitchContext for smp. (#879)

The function vTaskSwitchContext in smp has an parameter of core id,
which means this function is not only used for the core who call it.
Thus we should use the task running on the specific core id,
instead of use the task running on the core who call this function.

Co-authored-by: moral-hao <405197809@qq.com>
2 years agoaarch64: Rename ARM_CA53_64_BIT/_SRE to Arm_AARCH64/_SRE (#822)
Devaraj Ranganna [Tue, 31 Oct 2023 04:36:39 +0000 (04:36 +0000)]
aarch64: Rename ARM_CA53_64_BIT/_SRE to Arm_AARCH64/_SRE (#822)

The Cortex-A53 ports are generic and can be used as a starting point
for other Armv8-A application processors. Therefore, rename
`ARM_CA53_64_BIT` to `Arm_AARCH64` and `ARM_CA53_64_BIT_SRE` to
`Arm_AARCH64_SRE`.

With this renaming, existing projects that use old port, should
migrate to renamed port as follows:

* `ARM_CA53_64_BIT` -> `Arm_AARCH64`
* `ARM_CA53_64_BIT_SRE` -> `Arm_AARCH64_SRE`

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoMove cmake compile options to the example project (#872)
ActoryOu [Mon, 30 Oct 2023 15:35:42 +0000 (23:35 +0800)]
Move cmake compile options to the example project (#872)

* Move GCC compile option to GCC folder with toolchain option

* Add CI flow to build cmake example

* Fix CI

* formatting && enable Werror

* Add useless variable to test CI

* revert useless variable

* Add comments as examples.

* Remove default compile options.

* Formatting

* Remove compile option in kernel cmake and put the sample in examples/cmake_example

---------

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
2 years agoupdate coverity scan email (#871)
Tony Josi [Mon, 30 Oct 2023 12:49:29 +0000 (18:19 +0530)]
update coverity scan email (#871)

2 years agoSupport configurable RISC-V chip extension (#773)
Joe Benczarski [Fri, 27 Oct 2023 18:57:52 +0000 (14:57 -0400)]
Support configurable RISC-V chip extension (#773)

* Support configurable RISC-V chip extension

Added the FREERTOS_RISCV_EXTENSION option to allow the user
to select which chip extension they want included. Removed the
port for pulpino to instead use the new option.

* Add port GCC_RISC_V_GENERIC and IAR_RISC_V_GENERIC

* Add two rics-v generic ports to support FREERTOS_RISCV_EXTENSION
  config

---------

Co-authored-by: Joe Benczarski <jbenczarski@trijicon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Ching-Hsin Lee <chinglee@amazon.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2 years agoAdd nightly coverity scan (#859)
Tony Josi [Thu, 26 Oct 2023 05:57:45 +0000 (11:27 +0530)]
Add nightly coverity scan (#859)

* coverity scan job

* coverity scan badge in readme

* Update cron schedule

* revert adding badge

* update description

* updating review feedback

2 years agovTaskListTasks prints core affinity mask (#850)
Darian [Wed, 25 Oct 2023 21:45:03 +0000 (05:45 +0800)]
vTaskListTasks prints core affinity mask (#850)

This commit updates vTaskListTasks so that it prints uxCoreAffinityMask if
core affinity is enabled in configuration.

2 years agoUpdate example cmake project path (#851)
Tony Josi [Mon, 23 Oct 2023 09:20:41 +0000 (14:50 +0530)]
Update example cmake project path (#851)

* fix build on 64 bit platform

* moving sample cmake project to a separate root level dir

* moving sample cmake project to a separate root level dir

* updating paths for the sample cmake project

* rename example folder

* use configKERNEL_PROVIDED_STATIC_MEMORY

* update comments

* update comments

* rename folder to examples

* fix formatting

2 years agoRename CPU to Core (#849)
Darian [Mon, 23 Oct 2023 07:20:24 +0000 (15:20 +0800)]
Rename CPU to Core (#849)

This commit renames "CPU" to "Core" for any public facing API for consistency
with other SMP related APIs (e.g., "configNUMBER_OF_CORES").

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoRemove default behaviour of FREERTOS_HEAP. (#807)
Boris van der Meer [Mon, 23 Oct 2023 06:57:54 +0000 (08:57 +0200)]
Remove default behaviour of FREERTOS_HEAP. (#807)

To build a complete static application (configSUPPORT_DYNAMIC_ALLOCATION
set to 0) an ugly workaround is necessary, because when FREERTOS_HEAP is
not set, heap 4 is automatically selected in the current CMake.

Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2 years agoCovert object type check to runtime check (#846)
Gaurav-Aggarwal-AWS [Fri, 20 Oct 2023 16:38:03 +0000 (22:08 +0530)]
Covert object type check to runtime check (#846)

* Covert object type check to runtime check

It was checked using assert earlier.

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoKernel Checker CI Workflow File Updates (#804)
Soren Ptak [Thu, 19 Oct 2023 17:08:24 +0000 (10:08 -0700)]
Kernel Checker CI Workflow File Updates (#804)

* Perform sparse checkout of just the .github folder for the header check instead of all the files. Update python checkout version being used. Update the version of the get changed files action being used.

* Use echo groups on the header check

2 years agoFix size alignment in the integer overflow issue (#839)
Rahul Kar [Thu, 19 Oct 2023 06:38:22 +0000 (12:08 +0530)]
Fix size alignment in the integer overflow issue (#839)

2 years agoRemoves redundant API calls in MPU wrappers (#838)
Rahul Kar [Thu, 19 Oct 2023 05:50:19 +0000 (11:20 +0530)]
Removes redundant API calls in MPU wrappers (#838)

* Remove redundant API calls in Queue wrappers

2 years agoFix possible integer overflow (#836)
Gaurav-Aggarwal-AWS [Tue, 17 Oct 2023 16:01:43 +0000 (21:31 +0530)]
Fix possible integer overflow (#836)

* Fix possible integer overflow

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoFix reliability issues in CMake sample (#835)
Rahul Kar [Tue, 17 Oct 2023 14:29:37 +0000 (19:59 +0530)]
Fix reliability issues in CMake sample (#835)

* Fix reliability issues in CMake example sample.

2 years agoFix xTaskNotifyWait & ulTaskNotifyTake determinism. (#833)
Rahul Kar [Tue, 17 Oct 2023 09:35:18 +0000 (15:05 +0530)]
Fix xTaskNotifyWait & ulTaskNotifyTake determinism. (#833)

This PR fixes the bug described in the following issue:
https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/612.
This was originally contributed in the following PR:
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/625.

The implementation suspends the scheduler before exiting the
critical section (i.e. before enabling interrupts). If we do not do
so, a notification sent from an ISR, which happens after exiting
the critical section and before suspending the scheduler, will
get lost. The sequence of events will be:

1. Exit critical section.
2. Interrupt - ISR calls xTaskNotifyFromISR which adds the task to
    the Ready list.
3. Suspend scheduler.
4. prvAddCurrentTaskToDelayedList moves the task to the delayed
    or suspended list.
5. Resume scheduler does not touch the task (because it is not on
    the pendingReady list), effectively losing the notification from
    the ISR.

The same does not happen when we suspend the scheduler before
exiting the critical section. The sequence of events in this case will
be:

1. Suspend scheduler.
2. Exit critical section.
3. Interrupt - ISR calls xTaskNotifyFromISR which adds the task to
    the pendingReady list as the scheduler is suspended.
4. prvAddCurrentTaskToDelayedList adds the task to delayed or
    suspended list. Note that this operation does not nullify the add
    to pendingReady list done in the above step because a different
    list item, namely xEventListItem, is used for adding the task to the
    pendingReady list. In other words, the task still remains on the
    pendingReady list.
5. Resume scheduler moves the task from pendingReady list to the Ready list.

------------

Co-authored-by: Jacob Carver <karver8@github.com>
2 years agoAdd base priority get APIs (#818)
chinglee-iot [Tue, 17 Oct 2023 04:19:17 +0000 (12:19 +0800)]
Add base priority get APIs (#818)

* Add base priority get APIs
* Add MPU changes

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoAdd option to set the core affinity for the Timer Svc Task on SMP systems (#805)
Sudeep Mohanty [Mon, 16 Oct 2023 07:08:55 +0000 (09:08 +0200)]
Add option to set the core affinity for the Timer Svc Task on SMP systems (#805)

This PR introduces the configTIMER_SERVICE_TASK_CORE_AFFINITY option
which allows the system to configure the core affinity of the Timer
Service Task on an SMP system. The default affinity of the Timer Service
Task is set to tskNO_AFFINITY which is the current behavior on SMP
systems.

Signed-off-by: Sudeep Mohanty <sudp.mohanty@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoAdded the minimal example (#823)
Joseph Julicher [Sat, 14 Oct 2023 15:00:25 +0000 (08:00 -0700)]
Added the minimal example (#823)

* re-adding main.c to the minimal example

* Uncrustify: triggered by comment.

* Update minimal_freertos_example/main.c

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
* Add in the deleted cmake list

* Added a single newline at the end of the cmake

* Cleanup the CMakelists

* updates the main & Cmake

* Formatting

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2 years agoSeparate the task create function for core affinity (#789)
chinglee-iot [Thu, 12 Oct 2023 09:30:24 +0000 (17:30 +0800)]
Separate the task create function for core affinity (#789)

* Separate the task create function for core affinity
* Update function prototype and comment
* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoUpdate SMP get idle task memory for static allocation (#784)
chinglee-iot [Thu, 12 Oct 2023 02:41:16 +0000 (10:41 +0800)]
Update SMP get idle task memory for static allocation (#784)

* Add static idle task memory support for SMP
* Rename vApplicationMinimalIdleTask to vApplicationPassiveIdleTask
* Rename the macro configUSE_MINIMAL_IDLE_HOOK to configUSE_PASSIVE_IDLE_HOOK
* Update xTaskGetIdleTaskHandle for SMP
* Add more check in xTaskGetIdleTaskHandle
* Support configKERNEL_PROVIDED_STATIC_MEMORY for SMP

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoLink to the CONTRIBUTING.md file in this repo, not the github repo itself (#827)
Soren Ptak [Wed, 11 Oct 2023 06:34:01 +0000 (23:34 -0700)]
Link to the CONTRIBUTING.md file in this repo, not the github repo itself (#827)

2 years agoUpdate pull request information in readme (#821)
Monika Singh [Mon, 9 Oct 2023 09:10:59 +0000 (14:40 +0530)]
Update pull request information in readme (#821)

* Update pull request infomation in readme.

* Update link

2 years agoMake taskYIELD available to unprivileged tasks (#817) 819/head
Gaurav-Aggarwal-AWS [Fri, 6 Oct 2023 04:52:06 +0000 (10:22 +0530)]
Make taskYIELD available to unprivileged tasks (#817)

Make taskYIELD available to unprivileged tasks on ARMv8-M
ports.

2 years agoAdd configCONTROL_INFINITE_LOOP for loop control in unit test (#783)
chinglee-iot [Thu, 5 Oct 2023 08:57:53 +0000 (16:57 +0800)]
Add configCONTROL_INFINITE_LOOP for loop control in unit test (#783)

* Add configCONTROL_INFINITE_LOOP in FreeRTOS.h
* Use configCONTROL_INFINITE_LOOP in tasks.c and timer.c

---------

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
2 years agoAdd more comment for core affinity in prvSelectHighestPriorityTask (#801)
chinglee-iot [Thu, 5 Oct 2023 07:39:24 +0000 (15:39 +0800)]
Add more comment for core affinity in prvSelectHighestPriorityTask (#801)

* Add more comment for core affinity in prvSelectHighestPriorityTask

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoMove trace macro after declaration (#820)
chinglee-iot [Thu, 5 Oct 2023 06:46:38 +0000 (14:46 +0800)]
Move trace macro after declaration (#820)

* Move trace macro after declaration to comply with ISO C90

2 years agoImplement prvYieldCore with macro (#785)
chinglee-iot [Wed, 4 Oct 2023 11:33:28 +0000 (19:33 +0800)]
Implement prvYieldCore with macro (#785)

* Implement prvYieldCore with macro for performance and memory
* Remove the portCHECK_IF_IN_ISR macro check. It is not required in SMP
  now

Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoAdd taskYIELD_WITHIN_API macro (#782)
chinglee-iot [Wed, 4 Oct 2023 09:38:27 +0000 (17:38 +0800)]
Add taskYIELD_WITHIN_API macro (#782)

Add taskYIELD_WITHIN_API macro for readability improvement.

2 years agoremoved the copyright and license header for select files (#815)
Joseph Julicher [Tue, 3 Oct 2023 17:43:45 +0000 (10:43 -0700)]
removed the copyright and license header for select files (#815)

* removed the copyright and license header for files expected to be copied by users

* fixed a bug in the kernel checker.  temporarily restored the copyright in the sample config to allow this PR to pass the checks.

* Uncrustify: triggered by comment.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agobugfix: correct computation of stack size on Mac Posix port (#816)
Michael Fairman [Tue, 3 Oct 2023 06:00:33 +0000 (23:00 -0700)]
bugfix: correct computation of stack size on Mac Posix port (#816)

Aligns the stack end to a page boundary before computing its
size, since the size depends on both the start and end.

The original change which introduced stack alignment (#674)
only worked for cases where the round + trunc operation would
wind up within the same area, but would lead to segfaults in
other cases.

Also adds a typecast to the `mach_vm_round_page()` call, as
it is actually a macro which casts to `mach_vm_offset_t` and
the result here is used as a `StackType_t` pointer.

Tested on ARM64 and Intel MacOS, as well as ARM64 and Intel
Linux.  The test code included a single-task case, as well
as a case with two tasks passing queue messages.

2 years agoSample FreeRTOSConfig.h and template port (#812)
Joseph Julicher [Sat, 30 Sep 2023 02:11:55 +0000 (19:11 -0700)]
Sample FreeRTOSConfig.h and template port (#812)

* config file experiments

* adding a config file for an example

* Added a template port and updated the CMakeLists

* template and default configuration build

* finalising the sample FreeRTOSConfig.h header file

* removed .config hidden file

* further reductions in the template port

* Uncrustify: triggered by comment.

* Uncrustify: triggered by comment.

* minor readme updates

* fixed spelling error in HTTP

* fixed a type and added a link to the sample readme

* uncrustified FreeRTOSConfig.h

* Uncrustify: triggered by comment.

* Revert "Uncrustify: triggered by comment."

This reverts commit e534f46f2d772068fe787130ef615d2aea65a2df.

* Revert "Revert "Uncrustify: triggered by comment.""

This reverts commit c9058dd383ad475315c7867933dc9412918be81a.

* excluding the FreeRTOSConfig.h from copyright+license check because this file is intended to be incorporated into user code

* Removed the copyright and license from the template files

* put license copy in the template and sample files

* Uncrustify: triggered by comment.

---------

Co-authored-by: GitHub Action <action@github.com>
2 years agoCortex-M23: Do not use PSPLIM_NS (#791)
Devaraj Ranganna [Thu, 28 Sep 2023 09:08:55 +0000 (10:08 +0100)]
Cortex-M23: Do not use PSPLIM_NS (#791)

According to Armv8-M technical reference manual, if the main extension
is not implemented then PSPLIM_NS is RES0. Update the cortex-M23
port to not use the reserved PSPLIM_NS.

2 years agoApply formatting bot fix (#806)
Soren Ptak [Wed, 27 Sep 2023 19:03:41 +0000 (12:03 -0700)]
Apply formatting bot fix (#806)

2 years agoReplace sprintf with snprintf (#802)
Gaurav-Aggarwal-AWS [Tue, 26 Sep 2023 17:37:18 +0000 (23:07 +0530)]
Replace sprintf with snprintf (#802)

This change necessitates the introduction of 2 new APIs:

void vTaskListTasks( char * pcWriteBuffer, size_t uxBufferLength );
void vTaskGetRunTimeStatistics( char * pcWriteBuffer, size_t uxBufferLength );

These 2 APIs behave exactly as vTaskList and vTaskGetRunTimeStats
except the fact that they take the length of the pcWriteBuffer as the
second argument to ensure that we do not write past the buffer.

vTaskList and vTaskGetRunTimeStats assume that the length of the
buffer is configSTATS_BUFFER_MAX_LENGTH which defaults to 0xFFFF.
This is done to ensure that the existing applications do not break.
New applications should use the new APIs to avoid memory corruption.

2 years agoFix portSWITCH_TO_USER_MODE() on Armv7-M MPU ports (#803)
Soren Ptak [Tue, 26 Sep 2023 09:06:23 +0000 (02:06 -0700)]
Fix portSWITCH_TO_USER_MODE() on Armv7-M MPU ports (#803)

A task's privilege level is stored in ulTaskFlag member in the TCB. Current
implementation of portSWITCH_TO_USER_MODE() does not update this
flag but just lowers the processor's privilege level. This results in many
APIs incorrectly determining task's privilege level and access permissions -

- xPortIsAuthorizedToAccessBuffer
- xPortIsTaskPrivileged
- xPortIsAuthorizedToAccessKernelObject

This PR fixes the portSWITCH_TO_USER_MODE() implementation to correctly
update the ulTaskFlag member in the TCB before lowering the processor's
privilege level.

2 years agoRemove unwanted variable portACL_ENTRY_SIZE_BYTES (#810)
kar-rahul-aws [Tue, 26 Sep 2023 04:28:02 +0000 (09:58 +0530)]
Remove unwanted variable portACL_ENTRY_SIZE_BYTES (#810)

2 years agoReduce memory usage of ACL. (#809)
Moral-Hao [Mon, 25 Sep 2023 11:22:55 +0000 (19:22 +0800)]
Reduce memory usage of ACL. (#809)

Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
2 years agoUpdate pxMutexHolder is NULL check description (#800)
chinglee-iot [Sun, 24 Sep 2023 22:21:15 +0000 (06:21 +0800)]
Update pxMutexHolder is NULL check description (#800)

2 years agoAdd trace hook macro for most ports (#794)
Boris van der Meer [Wed, 20 Sep 2023 10:49:42 +0000 (12:49 +0200)]
Add trace hook macro for most ports (#794)

Add trace hook macro for most ports

In pull request #659 we introduced better support for tracing
tools like systemview. This patchset adds support for more
ports as requested in the original pull request.

2 years agoAdd Trace Hook Macros to all API calls (#786)
Sebastian Brosch [Wed, 20 Sep 2023 10:17:42 +0000 (12:17 +0200)]
Add Trace Hook Macros to all API calls (#786)

This pull-request adds out-of-the-box support for different tracing
tools. New trace hook macros have been added for all public API
functions, one for each function entry and one for each exit. There are
no functional changes, as the macros are by default empty.

For more information see following forum post:
https://forums.freertos.org/t/add-tracing-functionality-for-all-api-calls/18007.

2 years agoxQueueSendToFromFromISR --> xQueueSendToFrontFromISR (#795)
Robert Berger [Wed, 20 Sep 2023 09:03:56 +0000 (11:03 +0200)]
xQueueSendToFromFromISR --> xQueueSendToFrontFromISR (#795)

Co-authored-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
2 years agoFix xQueueSendToFront code comment (#796)
Robert Berger [Wed, 20 Sep 2023 07:47:26 +0000 (09:47 +0200)]
Fix xQueueSendToFront code comment (#796)

Co-authored-by: Robert Berger <Robert.Berger@ReliableEmbeddedSystems.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
2 years agoRemove CORTEX_M3_MPS2_QEMU_GCC Demo from kernel demos yaml file (#798)
kar-rahul-aws [Wed, 20 Sep 2023 07:34:14 +0000 (13:04 +0530)]
Remove CORTEX_M3_MPS2_QEMU_GCC Demo from kernel demos yaml file (#798)

2 years agoAdd default implementations of vApplicationGetIdleTaskMemory and vApplicationGetTimer...
Mehdi [Wed, 20 Sep 2023 05:39:37 +0000 (09:09 +0330)]
Add default implementations of vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory (#790)

This PR introduces configKERNEL_PROVIDED_STATIC_MEMORY option
which the application can set to 1 to use the default implementations
of vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory
functions.

If the application enables static allocation (i.e. sets
configUSE_STATIC_ALLOCATION to 1) and does not provide the above 2
functions, it will result in linker error. The application has two options:

1. Set configKERNEL_PROVIDED_STATIC_MEMORY to 1 to use the default
    implementations of these functions.
2. Provide implementations of these 2 functions.

Note that default definitions are only available for non-MPU ports. The
reason is that the stack alignment requirements vary for different
architectures.

2 years agoFix prototype in mpu_prototypes.h (#797)
Gaurav-Aggarwal-AWS [Wed, 20 Sep 2023 04:44:39 +0000 (10:14 +0530)]
Fix prototype in mpu_prototypes.h (#797)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoAdd the formatting bot action to FreeRTOS-Kernel (#787)
Soren Ptak [Mon, 18 Sep 2023 19:48:26 +0000 (15:48 -0400)]
Add the formatting bot action to FreeRTOS-Kernel (#787)

2 years agoAdd Access Control List to MPU ports (#765)
kar-rahul-aws [Mon, 18 Sep 2023 10:04:42 +0000 (15:34 +0530)]
Add Access Control List to MPU ports (#765)

This PR adds Access Control to kernel objects on a per task basis to MPU
ports. The following needs to be defined in the `FreeRTOSConfig.h` to
enable this feature:

```c
#define configUSE_MPU_WRAPPERS_V1 0
#define configENABLE_ACCESS_CONTROL_LIST 1
```

This PR adds the following new APIs:

```c
void vGrantAccessToTask( TaskHandle_t xTask,
                         TaskHandle_t xTaskToGrantAccess );
void vRevokeAccessToTask( TaskHandle_t xTask,
                          TaskHandle_t xTaskToRevokeAccess );

void vGrantAccessToSemaphore( TaskHandle_t xTask,
                              SemaphoreHandle_t xSemaphoreToGrantAccess );
void vRevokeAccessToSemaphore( TaskHandle_t xTask,
                               SemaphoreHandle_t xSemaphoreToRevokeAccess );

void vGrantAccessToQueue( TaskHandle_t xTask,
                          QueueHandle_t xQueueToGrantAccess );
void vRevokeAccessToQueue( TaskHandle_t xTask,
                           QueueHandle_t xQueueToRevokeAccess );

void vGrantAccessToQueueSet( TaskHandle_t xTask,
                             QueueSetHandle_t xQueueSetToGrantAccess );
void vRevokeAccessToQueueSet( TaskHandle_t xTask,
                              QueueSetHandle_t xQueueSetToRevokeAccess );

void vGrantAccessToEventGroup( TaskHandle_t xTask,
                               EventGroupHandle_t xEventGroupToGrantAccess );
void vRevokeAccessToEventGroup( TaskHandle_t xTask,
                                EventGroupHandle_t xEventGroupToRevokeAccess );

void vGrantAccessToStreamBuffer( TaskHandle_t xTask,
                                 StreamBufferHandle_t xStreamBufferToGrantAccess );
void vRevokeAccessToStreamBuffer( TaskHandle_t xTask,
                                  StreamBufferHandle_t xStreamBufferToRevokeAccess );

void vGrantAccessToMessageBuffer( TaskHandle_t xTask,
                                  MessageBufferHandle_t xMessageBufferToGrantAccess );
void vRevokeAccessToMessageBuffer( TaskHandle_t xTask,
                                   MessageBufferHandle_t xMessageBufferToRevokeAccess );

void vGrantAccessToTimer( TaskHandle_t xTask,
                          TimerHandle_t xTimerToGrantAccess );
void vRevokeAccessToTimer( TaskHandle_t xTask,
                           TimerHandle_t xTimerToRevokeAccess );
```

An unprivileged task by default has access to itself only and no other
kernel object. The application writer needs to explicitly grant an
unprivileged task access to all the kernel objects it needs. The best
place to do that is before starting the scheduler when all the kernel
objects are created.

For example, let's say an unprivileged tasks needs access to a queue and
an event group, the application writer needs to do the following:

```c
vGrantAccessToQueue( xUnprivilegedTaskHandle, xQueue );
vGrantAccessToEventGroup( xUnprivilegedTaskHandle, xEventGroup );
```

The application writer MUST revoke all the accesses before deleting a
task. Failing to do so will result in undefined behavior. In the above
example, the application writer needs to make the following 2 calls
before deleting the task:

```c
vRevokeAccessToQueue( xUnprivilegedTaskHandle, xQueue );
vRevokeAccessToEventGroup( xUnprivilegedTaskHandle, xEventGroup );

```

2 years agoUpdate taskYIELD_IF_USING_PREEMPTION macro (#769)
chinglee-iot [Mon, 18 Sep 2023 02:53:03 +0000 (10:53 +0800)]
Update taskYIELD_IF_USING_PREEMPTION macro (#769)

* Add taskYIELD_TASK_CORE_IF_USING_PREEMPTION and taskYIELD_ANY_CORE_IF_USING_PREEMPTION to align task yield behavior for single core and SMP.
---------

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2 years agoFix xStreamBufferCreateStatic() API for buffer size 1 (#793)
kar-rahul-aws [Wed, 13 Sep 2023 05:52:17 +0000 (11:22 +0530)]
Fix xStreamBufferCreateStatic() API for buffer size 1 (#793)

2 years agoAdd Trace Hook Macros and function that returns the start of the stack. (#659)
Boris van der Meer [Thu, 7 Sep 2023 23:20:13 +0000 (01:20 +0200)]
Add Trace Hook Macros and function that returns the start of the stack. (#659)

* Add Trace Hook Macros and function that returns the start of the stack.

* Remove obsolete functions.

---------

Co-authored-by: kar-rahul-aws <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Rahul Kar <karahulx@amazon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
2 years agoAdd macro taskTASK_IS_RUNNING_OR_SCHEDULED_TO_YIELD (#780)
chinglee-iot [Wed, 6 Sep 2023 11:18:43 +0000 (19:18 +0800)]
Add macro taskTASK_IS_RUNNING_OR_SCHEDULED_TO_YIELD (#780)

* Add macro taskTASK_IS_RUNNING_OR_SCHEDULED_TO_YIELD macro to align single core and SMP
* Update for explicit precedence in vTaskDelete
* Update comment when deleting a running task

2 years agoAdd configUSE_CORE_AFFINITY bits check (#776)
chinglee-iot [Wed, 6 Sep 2023 11:09:52 +0000 (19:09 +0800)]
Add configUSE_CORE_AFFINITY bits check (#776)

* Add core affinity bits check
* Add taskBITS_PER_BYTES

2 years agoUpdate task running state type and related macros (#770)
chinglee-iot [Wed, 6 Sep 2023 10:30:02 +0000 (18:30 +0800)]
Update task running state type and related macros (#770)

* Remove unnecessary type TaskRunning_t
* Rename taskTASK_YIELD to taskTASK_SCHEDULED_TO_YIELD
---------
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2 years agoAssert if prvCheckForRunStateChange is called in ISR (#779)
chinglee-iot [Wed, 6 Sep 2023 09:47:41 +0000 (17:47 +0800)]
Assert if prvCheckForRunStateChange is called in ISR (#779)

* Assert if prvCheckForRunStateChange is called in ISR

2 years agoUpdate taskSELECT_HIGHEST_PRIORITY_TASK macro for SMP (#777)
chinglee-iot [Wed, 6 Sep 2023 07:13:34 +0000 (15:13 +0800)]
Update taskSELECT_HIGHEST_PRIORITY_TASK macro for SMP (#777)

* Move the configUSE_PORT_OPTIMISED_TASK_SELECTION check to FreeRTOS.h
* SMP also use taskSELECT_HIGHEST_PRIORITY_TASK macro
---------

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
2 years agoCI-CD Updates (#768)
Soren Ptak [Tue, 5 Sep 2023 21:24:04 +0000 (17:24 -0400)]
CI-CD Updates (#768)

* Use new version of CI-CD Actions
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Format and spell check all files in the portable directory
* Remove the https:// from #errors and #warnings as uncrustify attempts to change it to /*
* Use checkout@v3 instead of checkout@v2 on all jobs
---------

2 years agoFix heap address calculation issue (#781)
Gaurav-Aggarwal-AWS [Tue, 5 Sep 2023 17:46:31 +0000 (23:16 +0530)]
Fix heap address calculation issue (#781)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoFix cast alignment warning in heap_4.c and heap_5.c (#771)
kar-rahul-aws [Mon, 4 Sep 2023 17:21:58 +0000 (22:51 +0530)]
Fix cast alignment warning in heap_4.c and heap_5.c (#771)

* Fix cast alignment warning
---------

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
2 years agoUpdate INFINITE_LOOP control (#775)
chinglee-iot [Mon, 4 Sep 2023 10:10:36 +0000 (18:10 +0800)]
Update INFINITE_LOOP control (#775)

* Use for loop instead of while loop for INFINITE_LOOP control

2 years agoUpdate block validate macro in heap_5 (#774)
chinglee-iot [Sun, 3 Sep 2023 01:19:26 +0000 (09:19 +0800)]
Update block validate macro in heap_5 (#774)

* Update block validate macro in heap_5, and update for readability
* Don't validate block pointer when configENABLE_HEAP_PROTECTOR is not set to 1

2 years agoFix typo in the include directory for the the GCC_ARM_CM55_TFM port (#764)
Jordan Williams [Fri, 25 Aug 2023 05:46:36 +0000 (00:46 -0500)]
Fix typo in the include directory for the the GCC_ARM_CM55_TFM port (#764)

Should be CM55 not CM85.

2 years agoHeap protect (#747)
oliverlavery [Wed, 23 Aug 2023 04:57:54 +0000 (05:57 +0100)]
Heap protect (#747)

Setting configENABLE_HEAP_PROTECTOR to 1 obfuscates heap
block pointers by XORing them with an application supplied
canary value. This obfuscation helps to catch heap corruption
should a heap buffer overflow occur.

This PR also adds heap bounds checking to heap_4 and heap_5.

This PR also adds some additional integer underflow checks.

2 years agoFix remarks emitted by IAR compiler (#763)
Gaurav-Aggarwal-AWS [Mon, 21 Aug 2023 09:18:22 +0000 (14:48 +0530)]
Fix remarks emitted by IAR compiler (#763)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2 years agoUse the bigger priority whenever possible. (#760) 754/head
Moral-Hao [Fri, 18 Aug 2023 16:05:10 +0000 (00:05 +0800)]
Use the bigger priority whenever possible. (#760)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoAdd runtime parameter checks (#761)
kar-rahul-aws [Fri, 18 Aug 2023 08:54:44 +0000 (14:24 +0530)]
Add runtime parameter checks (#761)

* Add runtime parameter checks

This commit adds runtime checks for function parameters to mpu_wrappers_v2 file. The same checks are performed
in the API implementation using asserts.

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
2 years agoUpdate version number in manifest.yml (#755)
kar-rahul-aws [Thu, 17 Aug 2023 08:07:58 +0000 (13:37 +0530)]
Update version number in manifest.yml (#755)

* Add automation to update version number in manifest.yml

* Make updater file executable

2 years agoAdd missing stack alignment adjustment if stack grows upwards (#751)
Chien Wong [Thu, 17 Aug 2023 04:53:10 +0000 (12:53 +0800)]
Add missing stack alignment adjustment if stack grows upwards (#751)

Signed-off-by: Chien Wong <m@xv97.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2 years agoBring the heap_4 improvements to secure_heap (#749)
Moral-Hao [Wed, 16 Aug 2023 16:26:58 +0000 (00:26 +0800)]
Bring the heap_4 improvements to secure_heap (#749)

This includes improvements like addition overflow checks,
readability improvements.

2 years agoMove size calculation out of critical section (#748)
Moral-Hao [Wed, 16 Aug 2023 16:01:17 +0000 (00:01 +0800)]
Move size calculation out of critical section (#748)

The size calculation in pvPortMalloc uses only parameters and read
only constants and therefore, can be moved out of critical section
to make the critical section as small as possible.

2 years agofix MPU wrapper for vTaskDelete for calling task deletion (#745)
kar-rahul-aws [Tue, 8 Aug 2023 06:48:34 +0000 (12:18 +0530)]
fix MPU wrapper for vTaskDelete for calling task deletion (#745)

2 years agoFix pxTopOfStack calculation in configINIT_TLS_BLOCK for picolib (#739)
bebebib-rs [Mon, 7 Aug 2023 06:22:52 +0000 (23:22 -0700)]
Fix pxTopOfStack calculation in configINIT_TLS_BLOCK for picolib (#739)

The pxTopOfStack calculation in configINIT_TLS_BLOCK for picolib needs
to decrement pxTopOfStack in order to meet the expectation of
 pxPortInitialiseStack function.