Linear Containers API Reference
Linked lists and Queues
IotListDouble_RemoveAll

Remove all elements in a doubly-linked list.

static inline void IotListDouble_RemoveAll( const IotListDouble_t * const pList,
void ( * freeElement )( void * pData ),
size_t linkOffset )
Parameters
[in]pListThe list to empty.
[in]freeElementA function to free memory used by each removed list element. Optional; pass NULL to ignore.
[in]linkOffsetOffset in bytes of a link member in its container, used to calculate the pointer to pass to freeElement. This value should be calculated with the C offsetof macro. This parameter is ignored if freeElement is NULL or its value is 0.