14#ifndef CDI_LIST_API_H__
15#define CDI_LIST_API_H__
98 return (0 >= list_ptr->
count);
112 new_entry_ptr->
next_ptr = next_entry_ptr;
113 new_entry_ptr->
prev_ptr = prev_entry_ptr;
115 next_entry_ptr->
prev_ptr = new_entry_ptr;
116 prev_entry_ptr->
next_ptr = new_entry_ptr;
132 new_entry_ptr->
next_ptr = next_entry_ptr;
133 new_entry_ptr->
prev_ptr = prev_entry_ptr;
135 next_entry_ptr->
prev_ptr = new_entry_ptr;
136 prev_entry_ptr->
next_ptr = new_entry_ptr;
210 assert(list_ptr->
count);
245 return list_ptr->
count;
282 return ret_entry_ptr;
This file contains the declarations for OS functions for creating/managing/freeing threads,...
static bool CdiListIsEmpty(const CdiList *list_ptr)
Definition list_api.h:96
static void CdiListAddTail(CdiList *list_ptr, CdiListEntry *new_entry_ptr)
Definition list_api.h:157
void CdiListInit(CdiList *list_ptr)
Definition list.c:38
static CdiListEntry * CdiListPop(CdiList *list_ptr)
Definition list_api.h:222
static void CdiListIteratorInit(CdiList *list_ptr, CdiListIterator *ret_iterator_ptr)
Definition list_api.h:255
static void CdiListAddBefore(CdiList *list_ptr, CdiListEntry *new_entry_ptr, CdiListEntry *next_entry_ptr)
Definition list_api.h:128
static CdiListEntry * CdiListPeekTail(const CdiList *list_ptr)
Definition list_api.h:185
static void CdiListRemove(CdiList *list_ptr, CdiListEntry *entry_ptr)
Definition list_api.h:200
static void CdiListAddHead(CdiList *list_ptr, CdiListEntry *new_entry_ptr)
Definition list_api.h:146
static void CdiListAddAfter(CdiList *list_ptr, CdiListEntry *new_entry_ptr, CdiListEntry *prev_entry_ptr)
Definition list_api.h:108
static CdiListEntry * CdiListPeek(const CdiList *list_ptr)
Definition list_api.h:169
static int CdiListCount(const CdiList *list_ptr)
Definition list_api.h:243
static CdiListEntry * CdiListIteratorGetNext(CdiListIterator *iterator_ptr)
Definition list_api.h:268
static CdiListEntry * CdiListGetHead(CdiList *list_ptr)
Definition list_api.h:84
This structure represents a single list entry.
Definition list_api.h:34
CdiListEntry * prev_ptr
Pointer to previous item in list. If no items in list, will point to itself.
Definition list_api.h:36
CdiListEntry * next_ptr
Pointer to next item in list. If no items in list, will point to itself.
Definition list_api.h:35
This structure represents a list iterator.
Definition list_api.h:50
CdiListEntry * next_ptr
Pointer to next item in list. If no items in list, will point to head_entry_ptr.
Definition list_api.h:52
CdiListEntry * head_ptr
Pointer to head entry of list.
Definition list_api.h:51
This structure represents a list.
Definition list_api.h:42
unsigned int count
Number of entries in the list (used for convenience).
Definition list_api.h:44
CdiListEntry head_entry
Head entry of list item. Only valid if count >= 1.
Definition list_api.h:43
The declarations in this header file contain utility definitions and function prototypes that are use...