Quality RTOS & Embedded Software

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


Loading

a bug in list.h

Posted by russot hw on October 28, 2004
in line #157:
"if( ( pxList )->pxIndex == ( pxList )->pxHead )"
should be:
"if( ( pxList )->pxIndex->next == ( pxList )->pxHead )"

this means that current iteration is tail_node;

RE: a bug in list.h

Posted by Richard on October 28, 2004
I cannot see anything wrong as below:

// Increment to the next item in the list
( pxList )->pxIndex = ( pxList )->pxIndex->pxNext;

// We don't want to point to the head marker as
// it is just a marker and not a genuine list item.
// If we have incremented to the head then ...
if( ( pxList )->pxIndex == ( pxList )->pxHead )
{
// ... increment again. This will take us to the
// first item in the list.
( pxList )->pxIndex = ( pxList )->pxIndex->pxNext;
}

// Return the owner of the index - which will
// now not be the list head marker.
pxTCB = ( volatile tskTCB * ) ( pxList )->pxIndex->pvOwner;

This line is fundamental to the scheduler and if wrong nothing would work - although I am open to counter arguments....


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


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

Latest News

Version 10.1.0 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.


Careers

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

Renesas

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