a bug in list.h
in line #157:
"if( ( pxList )->pxIndex == ( pxList )->pxHead )"
should be:
"if( ( pxList )->pxIndex->next == ( pxList )->pxHead )"
this means that current iteration is tail_node;
a bug in list.h
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….