firmware
IEM Firmware Documentation
Loading...
Searching...
No Matches
list.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xLIST_ITEM
struct  xLIST

Macros

#define configLIST_VOLATILE
#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE
#define listFIRST_LIST_INTEGRITY_CHECK_VALUE
#define listSECOND_LIST_INTEGRITY_CHECK_VALUE
#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE(pxItem)
#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE(pxItem)
#define listSET_LIST_INTEGRITY_CHECK_1_VALUE(pxList)
#define listSET_LIST_INTEGRITY_CHECK_2_VALUE(pxList)
#define listTEST_LIST_ITEM_INTEGRITY(pxItem)
#define listTEST_LIST_INTEGRITY(pxList)
#define listSET_LIST_ITEM_OWNER(pxListItem, pxOwner)
#define listGET_LIST_ITEM_OWNER(pxListItem)
#define listSET_LIST_ITEM_VALUE(pxListItem, xValue)
#define listGET_LIST_ITEM_VALUE(pxListItem)
#define listGET_ITEM_VALUE_OF_HEAD_ENTRY(pxList)
#define listGET_HEAD_ENTRY(pxList)
#define listGET_NEXT(pxListItem)
#define listGET_END_MARKER(pxList)
#define listLIST_IS_EMPTY(pxList)
#define listCURRENT_LIST_LENGTH(pxList)
#define listREMOVE_ITEM(pxItemToRemove)
#define listINSERT_END(pxList, pxNewListItem)
#define listGET_OWNER_OF_HEAD_ENTRY(pxList)
#define listIS_CONTAINED_WITHIN(pxList, pxListItem)
#define listLIST_ITEM_CONTAINER(pxListItem)
#define listLIST_IS_INITIALISED(pxList)

Typedefs

typedef struct xLIST_ITEM ListItem_t
typedef struct xLIST_ITEM MiniListItem_t
typedef struct xLIST List_t

Functions

void vListInitialise (List_t *const pxList) PRIVILEGED_FUNCTION
void vListInitialiseItem (ListItem_t *const pxItem) PRIVILEGED_FUNCTION
void vListInsert (List_t *const pxList, ListItem_t *const pxNewListItem) PRIVILEGED_FUNCTION
void vListInsertEnd (List_t *const pxList, ListItem_t *const pxNewListItem) PRIVILEGED_FUNCTION
UBaseType_t uxListRemove (ListItem_t *const pxItemToRemove) PRIVILEGED_FUNCTION

Macro Definition Documentation

◆ configLIST_VOLATILE

#define configLIST_VOLATILE

◆ listCURRENT_LIST_LENGTH

#define listCURRENT_LIST_LENGTH ( pxList)
Value:
( ( pxList )->uxNumberOfItems )

◆ listFIRST_LIST_INTEGRITY_CHECK_VALUE

#define listFIRST_LIST_INTEGRITY_CHECK_VALUE

◆ listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE

#define listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE

◆ listGET_END_MARKER

#define listGET_END_MARKER ( pxList)
Value:
( ( ListItem_t const * ) ( &( ( pxList )->xListEnd ) ) )
struct xLIST_ITEM ListItem_t
Definition list.h:154

◆ listGET_HEAD_ENTRY

#define listGET_HEAD_ENTRY ( pxList)
Value:
( ( ( pxList )->xListEnd ).pxNext )

◆ listGET_ITEM_VALUE_OF_HEAD_ENTRY

#define listGET_ITEM_VALUE_OF_HEAD_ENTRY ( pxList)
Value:
( ( ( pxList )->xListEnd ).pxNext->xItemValue )

◆ listGET_LIST_ITEM_OWNER

#define listGET_LIST_ITEM_OWNER ( pxListItem)
Value:
( ( pxListItem )->pvOwner )

◆ listGET_LIST_ITEM_VALUE

#define listGET_LIST_ITEM_VALUE ( pxListItem)
Value:
( ( pxListItem )->xItemValue )

◆ listGET_NEXT

#define listGET_NEXT ( pxListItem)
Value:
( ( pxListItem )->pxNext )

◆ listGET_OWNER_OF_HEAD_ENTRY

#define listGET_OWNER_OF_HEAD_ENTRY ( pxList)
Value:
( ( &( ( pxList )->xListEnd ) )->pxNext->pvOwner )

◆ listINSERT_END

#define listINSERT_END ( pxList,
pxNewListItem )
Value:
do { \
ListItem_t * const pxIndex = ( pxList )->pxIndex; \
\
/* Only effective when configASSERT() is also defined, these tests may catch \
* the list data structures being overwritten in memory. They will not catch \
* data errors caused by incorrect configuration or use of FreeRTOS. */ \
listTEST_LIST_INTEGRITY( ( pxList ) ); \
listTEST_LIST_ITEM_INTEGRITY( ( pxNewListItem ) ); \
\
/* Insert a new list item into ( pxList ), but rather than sort the list, \
* makes the new list item the last item to be removed by a call to \
* listGET_OWNER_OF_NEXT_ENTRY(). */ \
( pxNewListItem )->pxNext = pxIndex; \
( pxNewListItem )->pxPrevious = pxIndex->pxPrevious; \
\
pxIndex->pxPrevious->pxNext = ( pxNewListItem ); \
pxIndex->pxPrevious = ( pxNewListItem ); \
\
/* Remember which list the item is in. */ \
( pxNewListItem )->pxContainer = ( pxList ); \
\
( ( pxList )->uxNumberOfItems ) = ( UBaseType_t ) ( ( ( pxList )->uxNumberOfItems ) + 1U ); \
} while( 0 )
unsigned long UBaseType_t
Definition portmacro.h:60
struct xLIST_ITEM *configLIST_VOLATILE pxNext
Definition list.h:148
struct xLIST_ITEM *configLIST_VOLATILE pxPrevious
Definition list.h:149

◆ listIS_CONTAINED_WITHIN

#define listIS_CONTAINED_WITHIN ( pxList,
pxListItem )
Value:
( ( ( pxListItem )->pxContainer == ( pxList ) ) ? ( pdTRUE ) : ( pdFALSE ) )
#define pdFALSE
Definition projdefs.h:52
#define pdTRUE
Definition projdefs.h:53

◆ listLIST_IS_EMPTY

#define listLIST_IS_EMPTY ( pxList)
Value:
( ( ( pxList )->uxNumberOfItems == ( UBaseType_t ) 0 ) ? pdTRUE : pdFALSE )

◆ listLIST_IS_INITIALISED

#define listLIST_IS_INITIALISED ( pxList)
Value:
( ( pxList )->xListEnd.xItemValue == portMAX_DELAY )
#define portMAX_DELAY
Definition portmacro.h:64

◆ listLIST_ITEM_CONTAINER

#define listLIST_ITEM_CONTAINER ( pxListItem)
Value:
( ( pxListItem )->pxContainer )

◆ listREMOVE_ITEM

#define listREMOVE_ITEM ( pxItemToRemove)
Value:
do { \
/* The list item knows which list it is in. Obtain the list from the list \
* item. */ \
List_t * const pxList = ( pxItemToRemove )->pxContainer; \
\
( pxItemToRemove )->pxNext->pxPrevious = ( pxItemToRemove )->pxPrevious; \
( pxItemToRemove )->pxPrevious->pxNext = ( pxItemToRemove )->pxNext; \
/* Make sure the index is left pointing to a valid item. */ \
if( pxList->pxIndex == ( pxItemToRemove ) ) \
{ \
pxList->pxIndex = ( pxItemToRemove )->pxPrevious; \
} \
\
( pxItemToRemove )->pxContainer = NULL; \
( ( pxList )->uxNumberOfItems ) = ( UBaseType_t ) ( ( ( pxList )->uxNumberOfItems ) - 1U ); \
} while( 0 )
struct xLIST List_t
ListItem_t *configLIST_VOLATILE pxIndex
Definition list.h:176

◆ listSECOND_LIST_INTEGRITY_CHECK_VALUE

#define listSECOND_LIST_INTEGRITY_CHECK_VALUE

◆ listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE

#define listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE

◆ listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE

#define listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE ( pxItem)

◆ listSET_LIST_INTEGRITY_CHECK_1_VALUE

#define listSET_LIST_INTEGRITY_CHECK_1_VALUE ( pxList)

◆ listSET_LIST_INTEGRITY_CHECK_2_VALUE

#define listSET_LIST_INTEGRITY_CHECK_2_VALUE ( pxList)

◆ listSET_LIST_ITEM_OWNER

#define listSET_LIST_ITEM_OWNER ( pxListItem,
pxOwner )
Value:
( ( pxListItem )->pvOwner = ( void * ) ( pxOwner ) )

◆ listSET_LIST_ITEM_VALUE

#define listSET_LIST_ITEM_VALUE ( pxListItem,
xValue )
Value:
( ( pxListItem )->xItemValue = ( xValue ) )

◆ listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE

#define listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE ( pxItem)

◆ listTEST_LIST_INTEGRITY

#define listTEST_LIST_INTEGRITY ( pxList)

◆ listTEST_LIST_ITEM_INTEGRITY

#define listTEST_LIST_ITEM_INTEGRITY ( pxItem)

Typedef Documentation

◆ List_t

typedef struct xLIST List_t

◆ ListItem_t

typedef struct xLIST_ITEM ListItem_t

◆ MiniListItem_t

typedef struct xLIST_ITEM MiniListItem_t

Function Documentation

◆ uxListRemove()

UBaseType_t uxListRemove ( ListItem_t *const pxItemToRemove)
Here is the caller graph for this function:

◆ vListInitialise()

void vListInitialise ( List_t *const pxList)
Here is the caller graph for this function:

◆ vListInitialiseItem()

void vListInitialiseItem ( ListItem_t *const pxItem)

◆ vListInsert()

void vListInsert ( List_t *const pxList,
ListItem_t *const pxNewListItem )
Here is the caller graph for this function:

◆ vListInsertEnd()

void vListInsertEnd ( List_t *const pxList,
ListItem_t *const pxNewListItem )