diff --git a/include/list.h b/include/list.h index e2a00750c..ad743a26e 100644 --- a/include/list.h +++ b/include/list.h @@ -281,7 +281,9 @@ typedef struct xLIST List_t * const pxConstList = ( pxList ); \ /* Increment the index to the next item and return the item, ensuring */ \ /* we don't return the marker used at the end of the list. */ \ - ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \ + if (configUSE_TIME_SLICING == 1){ \ + ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \ + } \ if( ( void * ) ( pxConstList )->pxIndex == ( void * ) &( ( pxConstList )->xListEnd ) ) \ { \ ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \