98 #ifndef INC_FREERTOS_H
99 #error FreeRTOS.h must be included before list.h
133 #ifndef configLIST_VOLATILE
134 #define configLIST_VOLATILE
146 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 0 )
148 #define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
149 #define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
150 #define listFIRST_LIST_INTEGRITY_CHECK_VALUE
151 #define listSECOND_LIST_INTEGRITY_CHECK_VALUE
152 #define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )
153 #define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem )
154 #define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList )
155 #define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList )
156 #define listTEST_LIST_ITEM_INTEGRITY( pxItem )
157 #define listTEST_LIST_INTEGRITY( pxList )
160 #define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue1;
161 #define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue2;
162 #define listFIRST_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue1;
163 #define listSECOND_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue2;
166 #define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue1 = pdINTEGRITY_CHECK_VALUE
167 #define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue2 = pdINTEGRITY_CHECK_VALUE
168 #define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ) ( pxList )->xListIntegrityValue1 = pdINTEGRITY_CHECK_VALUE
169 #define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ) ( pxList )->xListIntegrityValue2 = pdINTEGRITY_CHECK_VALUE
173 #define listTEST_LIST_ITEM_INTEGRITY( pxItem ) configASSERT( ( ( pxItem )->xListItemIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxItem )->xListItemIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )
174 #define listTEST_LIST_INTEGRITY( pxList ) configASSERT( ( ( pxList )->xListIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxList )->xListIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) )
182 listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
184 struct xLIST_ITEM *configLIST_VOLATILE pxNext;
185 struct xLIST_ITEM *configLIST_VOLATILE pxPrevious;
187 void *configLIST_VOLATILE pvContainer;
188 listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
193 listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
195 struct xLIST_ITEM *configLIST_VOLATILE pxNext;
196 struct xLIST_ITEM *configLIST_VOLATILE pxPrevious;
204 listFIRST_LIST_INTEGRITY_CHECK_VALUE
208 listSECOND_LIST_INTEGRITY_CHECK_VALUE
218 #define listSET_LIST_ITEM_OWNER( pxListItem, pxOwner ) ( ( pxListItem )->pvOwner = ( void * ) ( pxOwner ) )
227 #define listGET_LIST_ITEM_OWNER( pxListItem ) ( ( pxListItem )->pvOwner )
236 #define listSET_LIST_ITEM_VALUE( pxListItem, xValue ) ( ( pxListItem )->xItemValue = ( xValue ) )
246 #define listGET_LIST_ITEM_VALUE( pxListItem ) ( ( pxListItem )->xItemValue )
255 #define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue )
263 #define listGET_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext )
271 #define listGET_NEXT( pxListItem ) ( ( pxListItem )->pxNext )
279 #define listGET_END_MARKER( pxList ) ( ( ListItem_t const * ) ( &( ( pxList )->xListEnd ) ) )
288 #define listLIST_IS_EMPTY( pxList ) ( ( BaseType_t ) ( ( pxList )->uxNumberOfItems == ( UBaseType_t ) 0 ) )
293 #define listCURRENT_LIST_LENGTH( pxList ) ( ( pxList )->uxNumberOfItems )
315 #define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
317 List_t * const pxConstList = ( pxList ); \
320 ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \
321 if( ( void * ) ( pxConstList )->pxIndex == ( void * ) &( ( pxConstList )->xListEnd ) ) \
323 ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \
325 ( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
345 #define listGET_OWNER_OF_HEAD_ENTRY( pxList ) ( (&( ( pxList )->xListEnd ))->pxNext->pvOwner )
356 #define listIS_CONTAINED_WITHIN( pxList, pxListItem ) ( ( BaseType_t ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) )
364 #define listLIST_ITEM_CONTAINER( pxListItem ) ( ( pxListItem )->pvContainer )
371 #define listLIST_IS_INITIALISED( pxList ) ( ( pxList )->xListEnd.xItemValue == portMAX_DELAY )
383 void vListInitialise(
List_t *
const pxList) PRIVILEGED_FUNCTION;
394 void vListInitialiseItem(
ListItem_t *
const pxItem) PRIVILEGED_FUNCTION;
407 void vListInsert(
List_t *
const pxList,
ListItem_t *
const pxNewListItem) PRIVILEGED_FUNCTION;
428 void vListInsertEnd(
List_t *
const pxList,
ListItem_t *
const pxNewListItem) PRIVILEGED_FUNCTION;