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/IAR
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
..
78K0R Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CA5_No_GIC Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CA9 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CM0 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CM3 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CM4F Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CM4F_MPU Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ARM_CM7 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -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_CRx_No_GIC Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
ATMega323 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
AtmelSAM7S64 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
AtmelSAM9XE Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
AVR32_UC3 Fix some broken/redirected URL (#172) 2020-09-21 15:49:55 -07:00
AVR_AVRDx porthardware.h file update for AVR Mega0 and Dx (#212) 2020-10-27 12:26:52 -07:00
AVR_Mega0 porthardware.h file update for AVR Mega0 and Dx (#212) 2020-10-27 12:26:52 -07:00
LPC2000 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
MSP430 Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
MSP430X 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
RX600 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
RXv2 Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
STR71x Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
STR75x Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
STR91x Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
V850ES Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00