Quality RTOS & Embedded Software

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


superfluous instruction in queue.c

Posted by Nobody/Anonymous on October 26, 2005

The function prvUnlockQueue in queue.c contains:

/* Do the same for the Rx lock. */

Couldn't these lines be deleted? (Use 1 critical section for the whole function instead of 2. The scheduler is suspended anyway so timing-critical tasks won't benefit from the additional opportunity to allow tick-interrupts)


RE: superfluous instruction in queue.c

Posted by Richard on October 26, 2005
Yes the lines could be deleted - however they are included to minamise the amount of time interrupts are suspended. The scheduler is suspended, but other interrupts will still operate.

The scheduler suspension mechanism is the most complex part of the code. Its only purpose is to enable interrupts to continue to be processed even when kernel data structures are being accessed. Rather nifty I think, but I am bias :-)

It is a trade of between execution speed and responsiveness.


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

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

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

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

Xilinx Microblaze and Zynq partner