Double linked list management. More...
|
Data Structures | |
| struct | co_dlist_hdr |
| Double linked list element header. More... | |
| struct | co_dlist |
| Double link list. More... | |
Functions | |
| void | co_dlist_init (struct co_dlist *list) |
| Initialize the double linked list. | |
| void | co_dlist_push_back (struct co_dlist *list, struct co_dlist_hdr *list_hdr) |
| Add an element at the end of the double linked list. | |
| void | co_dlist_push_front (struct co_dlist *list, struct co_dlist_hdr *list_hdr) |
| Add an element at the beginning of the double linked list. | |
| struct co_dlist_hdr * | co_dlist_pop_front (struct co_dlist *list) |
| Extract the first element of the double linked list. | |
| void | co_dlist_extract (struct co_dlist *list, struct co_dlist_hdr const *list_hdr) |
| Search for a specific element in the list, and extract it if found. | |
| __INLINE bool | co_dlist_is_empty (struct co_dlist const *list) |
| Test if the list is empty. | |
| __INLINE uint32_t | co_dlist_cnt (struct co_dlist const *list) |
| Return the number of element of the list. | |
| __INLINE struct co_dlist_hdr * | co_dlist_pick (struct co_dlist const *list) |
| Pick the first element from the list without removing it. | |
| __INLINE struct co_dlist_hdr * | co_dlist_next (struct co_dlist_hdr const *list_hdr) |
| Return following element of a list element. | |
Double linked list management.
This module contains the double linked list structures and handling functions.
| __INLINE uint32_t co_dlist_cnt | ( | struct co_dlist const * | list | ) |
Return the number of element of the list.
| [in,out] | list | Pointer to the double linked list. |
Definition at line 157 of file co_dlist.h.
References co_dlist::cnt.
| void co_dlist_extract | ( | struct co_dlist * | list, | |
| struct co_dlist_hdr const * | list_hdr | |||
| ) |
Search for a specific element in the list, and extract it if found.
| [in,out] | list | Pointer to the double linked list. |
| [in] | list_hdr | Pointer to the searched element. |
| void co_dlist_init | ( | struct co_dlist * | list | ) |
Initialize the double linked list.
| [in,out] | list | Pointer to the double linked list. |
| __INLINE bool co_dlist_is_empty | ( | struct co_dlist const * | list | ) |
Test if the list is empty.
| [in] | list | Pointer to the double linked list. |
Definition at line 141 of file co_dlist.h.
References co_dlist::first.
| __INLINE struct co_dlist_hdr* co_dlist_next | ( | struct co_dlist_hdr const * | list_hdr | ) | [read] |
Return following element of a list element.
| [in] | list_hdr | Pointer to the double linked list element. |
Definition at line 186 of file co_dlist.h.
References co_dlist_hdr::next.
| __INLINE struct co_dlist_hdr* co_dlist_pick | ( | struct co_dlist const * | list | ) | [read] |
Pick the first element from the list without removing it.
| [in] | list | Pointer to the double linked list. |
Definition at line 171 of file co_dlist.h.
References co_dlist::first.
| struct co_dlist_hdr * co_dlist_pop_front | ( | struct co_dlist * | list | ) | [read] |
Extract the first element of the double linked list.
| [in,out] | list | Pointer to the double linked list. |
| void co_dlist_push_back | ( | struct co_dlist * | list, | |
| struct co_dlist_hdr * | list_hdr | |||
| ) |
Add an element at the end of the double linked list.
| [in,out] | list | Pointer to the double linked list. |
| [in,out] | list_hdr | Pointer to the element to add at the end of the list. |
| void co_dlist_push_front | ( | struct co_dlist * | list, | |
| struct co_dlist_hdr * | list_hdr | |||
| ) |
Add an element at the beginning of the double linked list.
| [in,out] | list | Pointer to the double linked list. |
| [in,out] | list_hdr | Pointer to the element to add at the beginning of the list. |
1.6.1