Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Cygnal port - portENTER_CRITICAL

Posted by Nobody/Anonymous on November 17, 2005
I have a question on the portENTER_CRITICAL() and portEXIT_CRITICAL() macros in the Cygnal port (portmacro.h):
What is the reason for the pushing and popping of IE? Can't you just disable interrupts and enable them (EA = 0 on ENTER and EA = 1 on EXIT)?

Thanks.

RE: Cygnal port - portENTER_CRITICAL

Posted by Nobody/Anonymous on November 17, 2005
Each task maintains its own interrupt state so the register must be saved. One task may disable interrupts, but then cause a context switch. Wile it is swapped out another task will run which may have interrupts enabled. When the original task starts again it must start with its expected context - interrupts being disabled.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS