FreeRTOS-Kernel/portable/GCC
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
..
ARM7_AT91FR40008 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM7_AT91SAM7S Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM7_LPC23xx Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM7_LPC2000 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CA9 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CA53_64_BIT Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CM0 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CM3 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CM3_MPU Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CM4_MPU Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CM4F Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CM7 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ARM_CM23 Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
ARM_CM23_NTZ/non_secure Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
ARM_CM33 Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
ARM_CM33_NTZ/non_secure Ensure interrupts are enabled at first task start (#214) 2020-11-05 09:26:56 -08:00
ARM_CR5 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CRx_No_GIC Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ATMega323 update interrupt vector names for ATMega32 (#196) 2020-10-26 13:31:15 -07:00
AVR32_UC3 Fix some broken/redirected URL (#172) 2020-09-21 15:49:55 -07:00
AVR_AVRDx Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
AVR_Mega0 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ColdFire_V2 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
CORTUS_APS3 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
H8S2329 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
HCS12 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
IA32_flat Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
MCF5235 Fix some broken/redirected URL (#172) 2020-09-21 15:49:55 -07:00
MicroBlaze Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
MicroBlazeV8 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
MicroBlazeV9 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
MSP430F449 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
NiosII Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
PPC405_Xilinx Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
PPC440_Xilinx Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
RISC-V Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
RL78 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
RX100 Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
RX200 Fix some broken/redirected URL (#172) 2020-09-21 15:49:55 -07:00
RX600 Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
RX600v2 Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
RX700v3_DPFPU Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
STR75x Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
TriCore_1782 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00