56 #ifndef INC_FREERTOS_H 57 #error FreeRTOS.h must be included before list.h 91 #ifndef configLIST_VOLATILE 92 #define configLIST_VOLATILE 104 #if( configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES == 0 ) 106 #define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE 107 #define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE 108 #define listFIRST_LIST_INTEGRITY_CHECK_VALUE 109 #define listSECOND_LIST_INTEGRITY_CHECK_VALUE 110 #define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) 111 #define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) 112 #define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ) 113 #define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ) 114 #define listTEST_LIST_ITEM_INTEGRITY( pxItem ) 115 #define listTEST_LIST_INTEGRITY( pxList ) 118 #define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue1; 119 #define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE TickType_t xListItemIntegrityValue2; 120 #define listFIRST_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue1; 121 #define listSECOND_LIST_INTEGRITY_CHECK_VALUE TickType_t xListIntegrityValue2; 124 #define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue1 = pdINTEGRITY_CHECK_VALUE 125 #define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ) ( pxItem )->xListItemIntegrityValue2 = pdINTEGRITY_CHECK_VALUE 126 #define listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ) ( pxList )->xListIntegrityValue1 = pdINTEGRITY_CHECK_VALUE 127 #define listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ) ( pxList )->xListIntegrityValue2 = pdINTEGRITY_CHECK_VALUE 131 #define listTEST_LIST_ITEM_INTEGRITY( pxItem ) configASSERT( ( ( pxItem )->xListItemIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxItem )->xListItemIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) ) 132 #define listTEST_LIST_INTEGRITY( pxList ) configASSERT( ( ( pxList )->xListIntegrityValue1 == pdINTEGRITY_CHECK_VALUE ) && ( ( pxList )->xListIntegrityValue2 == pdINTEGRITY_CHECK_VALUE ) ) 141 listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
142 configLIST_VOLATILE TickType_t xItemValue;
143 struct xLIST_ITEM * configLIST_VOLATILE pxNext;
144 struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
146 void * configLIST_VOLATILE pvContainer;
147 listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
153 listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
154 configLIST_VOLATILE TickType_t xItemValue;
155 struct xLIST_ITEM * configLIST_VOLATILE pxNext;
156 struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
165 listFIRST_LIST_INTEGRITY_CHECK_VALUE
166 volatile UBaseType_t uxNumberOfItems;
167 ListItem_t * configLIST_VOLATILE pxIndex;
168 MiniListItem_t xListEnd;
169 listSECOND_LIST_INTEGRITY_CHECK_VALUE
179 #define listSET_LIST_ITEM_OWNER( pxListItem, pxOwner ) ( ( pxListItem )->pvOwner = ( void * ) ( pxOwner ) ) 188 #define listGET_LIST_ITEM_OWNER( pxListItem ) ( ( pxListItem )->pvOwner ) 197 #define listSET_LIST_ITEM_VALUE( pxListItem, xValue ) ( ( pxListItem )->xItemValue = ( xValue ) ) 207 #define listGET_LIST_ITEM_VALUE( pxListItem ) ( ( pxListItem )->xItemValue ) 216 #define listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext->xItemValue ) 224 #define listGET_HEAD_ENTRY( pxList ) ( ( ( pxList )->xListEnd ).pxNext ) 232 #define listGET_NEXT( pxListItem ) ( ( pxListItem )->pxNext ) 240 #define listGET_END_MARKER( pxList ) ( ( ListItem_t const * ) ( &( ( pxList )->xListEnd ) ) ) 249 #define listLIST_IS_EMPTY( pxList ) ( ( BaseType_t ) ( ( pxList )->uxNumberOfItems == ( UBaseType_t ) 0 ) ) 254 #define listCURRENT_LIST_LENGTH( pxList ) ( ( pxList )->uxNumberOfItems ) 276 #define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \ 278 List_t * const pxConstList = ( pxList ); \ 281 ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \ 282 if( ( void * ) ( pxConstList )->pxIndex == ( void * ) &( ( pxConstList )->xListEnd ) ) \ 284 ( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \ 286 ( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \ 306 #define listGET_OWNER_OF_HEAD_ENTRY( pxList ) ( (&( ( pxList )->xListEnd ))->pxNext->pvOwner ) 317 #define listIS_CONTAINED_WITHIN( pxList, pxListItem ) ( ( BaseType_t ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) ) 325 #define listLIST_ITEM_CONTAINER( pxListItem ) ( ( pxListItem )->pvContainer ) 332 #define listLIST_IS_INITIALISED( pxList ) ( ( pxList )->xListEnd.xItemValue == portMAX_DELAY ) 344 void vListInitialise( List_t *
const pxList ) PRIVILEGED_FUNCTION;
355 void vListInitialiseItem( ListItem_t *
const pxItem ) PRIVILEGED_FUNCTION;
368 void vListInsert( List_t *
const pxList, ListItem_t *
const pxNewListItem ) PRIVILEGED_FUNCTION;
389 void vListInsertEnd( List_t *
const pxList, ListItem_t *
const pxNewListItem ) PRIVILEGED_FUNCTION;
404 UBaseType_t uxListRemove( ListItem_t *
const pxItemToRemove ) PRIVILEGED_FUNCTION;