uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
list.h File Reference

Go to the source code of this file.

Classes

struct  xLIST_ITEM
 
struct  xMINI_LIST_ITEM
 
struct  xLIST
 

Macros

#define configLIST_VOLATILE
 
#define listSET_LIST_ITEM_OWNER(pxListItem, pxOwner)   ( ( pxListItem )->pvOwner = ( void * ) ( pxOwner ) )
 
#define listGET_LIST_ITEM_OWNER(pxListItem)   ( pxListItem )->pvOwner
 
#define listSET_LIST_ITEM_VALUE(pxListItem, xValue)   ( ( pxListItem )->xItemValue = ( xValue ) )
 
#define listGET_LIST_ITEM_VALUE(pxListItem)   ( ( pxListItem )->xItemValue )
 
#define listGET_ITEM_VALUE_OF_HEAD_ENTRY(pxList)   ( (&( ( pxList )->xListEnd ))->pxNext->xItemValue )
 
#define listLIST_IS_EMPTY(pxList)   ( ( portBASE_TYPE ) ( ( pxList )->uxNumberOfItems == ( unsigned portBASE_TYPE ) 0 ) )
 
#define listCURRENT_LIST_LENGTH(pxList)   ( ( pxList )->uxNumberOfItems )
 
#define listGET_OWNER_OF_NEXT_ENTRY(pxTCB, pxList)
 
#define listGET_OWNER_OF_HEAD_ENTRY(pxList)   ( (&( ( pxList )->xListEnd ))->pxNext->pvOwner )
 
#define listIS_CONTAINED_WITHIN(pxList, pxListItem)   ( ( portBASE_TYPE ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) )
 
#define listLIST_ITEM_CONTAINER(pxListItem)   ( ( pxListItem )->pvContainer )
 
#define listLIST_IS_INITIALISED(pxList)   ( ( pxList )->xListEnd.xItemValue == portMAX_DELAY )
 

Typedefs

typedef struct xLIST_ITEM xListItem
 
typedef struct xMINI_LIST_ITEM xMiniListItem
 
typedef struct xLIST xList
 

Functions

void vListInitialise (xList *const pxList)
 
void vListInitialiseItem (xListItem *const pxItem)
 
void vListInsert (xList *const pxList, xListItem *const pxNewListItem)
 
void vListInsertEnd (xList *const pxList, xListItem *const pxNewListItem)
 
unsigned portBASE_TYPE uxListRemove (xListItem *const pxItemToRemove)
 

Macro Definition Documentation

#define configLIST_VOLATILE

Definition at line 127 of file list.h.

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

Definition at line 222 of file list.h.

#define listGET_ITEM_VALUE_OF_HEAD_ENTRY (   pxList)    ( (&( ( pxList )->xListEnd ))->pxNext->xItemValue )

Definition at line 208 of file list.h.

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

Definition at line 180 of file list.h.

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

Definition at line 199 of file list.h.

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

Definition at line 273 of file list.h.

#define listGET_OWNER_OF_NEXT_ENTRY (   pxTCB,
  pxList 
)
Value:
{ \
xList * 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( ( void * ) ( pxConstList )->pxIndex == ( void * ) &( ( pxConstList )->xListEnd ) ) \
{ \
( pxConstList )->pxIndex = ( pxConstList )->pxIndex->pxNext; \
} \
( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
}

Definition at line 243 of file list.h.

#define listIS_CONTAINED_WITHIN (   pxList,
  pxListItem 
)    ( ( portBASE_TYPE ) ( ( pxListItem )->pvContainer == ( void * ) ( pxList ) ) )

Definition at line 285 of file list.h.

#define listLIST_IS_EMPTY (   pxList)    ( ( portBASE_TYPE ) ( ( pxList )->uxNumberOfItems == ( unsigned portBASE_TYPE ) 0 ) )

Definition at line 217 of file list.h.

#define listLIST_IS_INITIALISED (   pxList)    ( ( pxList )->xListEnd.xItemValue == portMAX_DELAY )

Definition at line 300 of file list.h.

#define listLIST_ITEM_CONTAINER (   pxListItem)    ( ( pxListItem )->pvContainer )

Definition at line 293 of file list.h.

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

Definition at line 171 of file list.h.

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

Definition at line 189 of file list.h.

Typedef Documentation

typedef struct xLIST xList
typedef struct xLIST_ITEM xListItem

Definition at line 144 of file list.h.

Definition at line 152 of file list.h.

Function Documentation

unsigned portBASE_TYPE uxListRemove ( xListItem *const  pxItemToRemove)

Definition at line 181 of file list.c.

void vListInitialise ( xList *const  pxList)

Definition at line 75 of file list.c.

void vListInitialiseItem ( xListItem *const  pxItem)

Definition at line 95 of file list.c.

void vListInsert ( xList *const  pxList,
xListItem *const  pxNewListItem 
)

Definition at line 123 of file list.c.

void vListInsertEnd ( xList *const  pxList,
xListItem *const  pxNewListItem 
)

Definition at line 102 of file list.c.