This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
FreeRTOS-Kernel/portable
Gaurav-Aggarwal-AWS ebbe2cf854
Ensure interrupts are enabled at first task start (#214)
Critical sections in FreeRTOS are implemented using the following two
functions:

void vPortEnterCritical( void )
{
    portDISABLE_INTERRUPTS();
    uxCriticalNesting++;
}

void vPortExitCritical( void )
{
    uxCriticalNesting--;

    if( uxCriticalNesting == 0 )
    {
        portENABLE_INTERRUPTS();
    }
}

uxCriticalNesting is initialized to a large value at the start and set
to zero when the scheduler is started (xPortStartScheduler). As a
result, before the scheduler is started, a pair of enter/exit critical
section will leave the interrupts disabled because uxCriticalNesting
will not reach zero in the vPortExitCritical function. This is done to
ensure that the interrupts remain disabled from the time first FreeRTOS
API is called to the time when the scheduler is started. The scheduler
starting code is expected to enure that interrupts are enabled before
the first task starts executing.

Cortex-M33 ports were not enabling interrupts before starting the first
task and as a result, the first task was started with interrupts
disabled. This PR fixes the issue by ensuring that interrupts are
enabled before the first task is started.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2020-11-05 09:26:56 -08:00
..
ARMClang Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00
ARMv8M Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
BCC/16BitDOS Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
CCS Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
CodeWarrior Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
Common Recently vTaskDelayUntil() was updated to xTaskDelayUntil() because the function now returns a value. The PR didn't make the same change in the MPU port, or update the constants required to include the xTaskDelayUntil() function in the build. (#199) 2020-10-11 14:04:49 -07:00
GCC Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
IAR Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
Keil Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00
MemMang Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
MikroC/ARM_CM4F Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
MPLAB Fix Stack alignment for Microchip PIC32MX port (#182) 2020-09-28 00:16:18 -07:00
MSVC-MingW Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
oWatcom/16BitDOS Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Paradigm/Tern_EE Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Renesas Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
Rowley Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
RVDS Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
SDCC/Cygnal Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Softune Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Tasking/ARM_CM4F Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ThirdParty Upstream stack masking fix to GCC ports. (#210) 2020-10-27 11:32:09 -07:00
WizC/PIC18 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
readme.txt Style: Change FreeRTOS websites in comments (#131) 2020-08-20 14:59:28 -07:00

Each real time kernel port consists of three files that contain the core kernel
components and are common to every port, and one or more files that are
specific to a particular microcontroller and/or compiler.


+ The FreeRTOS/Source/Portable/MemMang directory contains the five sample
memory allocators as described on the https://www.FreeRTOS.org WEB site.

+ The other directories each contain files specific to a particular
microcontroller or compiler, where the directory name denotes the compiler
specific files the directory contains.



For example, if you are interested in the [compiler] port for the [architecture]
microcontroller, then the port specific files are contained in
FreeRTOS/Source/Portable/[compiler]/[architecture] directory.  If this is the
only port you are interested in then all the other directories can be
ignored.