|
AM243x MCU+ SDK
09.02.00
|
|
Go to the documentation of this file.
59 #ifndef LUB_LIST_UTILS_H_
60 #define LUB_LIST_UTILS_H_
82 #define UB_LIST_NODE_INIT {NULL, NULL, NULL}
96 #define UB_LIST_INIT {NULL, NULL, 0}
219 return node ? node->
data : NULL;
234 #define UB_LIST_FOREACH_ITER(ub_list, node) \
235 (node) = ub_list_head((ub_list)); (node); (node) = (node)->next
bool() ub_list_sort_h(struct ub_list_node *node1, struct ub_list_node *node2, void *arg)
Comparator function handler for nodes.
Definition: ub_llist.h:166
void ub_list_append(struct ub_list *ub_list, struct ub_list_node *node)
Append a node at the end of the ub_list.
Link ub_list structure.
Definition: ub_llist.h:87
struct ub_list_node * ub_list_apply(const struct ub_list *ub_list, bool fwd, ub_list_apply_h *ah, void *arg)
Apply function to nodes in the ub_list.
void ub_list_prepend(struct ub_list *ub_list, struct ub_list_node *node)
Append a node at the start of the ub_list.
void ub_list_clear(struct ub_list *ub_list, ub_list_node_clear_h node_clear, void *arg)
Clear the ub_list without freeing any nodes.
bool() ub_list_apply_h(struct ub_list_node *node, void *arg)
Apply function handler for nodes.
Definition: ub_llist.h:182
static bool ub_list_isempty(const struct ub_list *ub_list)
Check if ub_list is empty.
Definition: ub_llist.h:227
struct ub_list_node * ub_list_tail(const struct ub_list *ub_list)
Get last entry of the ub_list.
struct ub_list_node * ub_list_head(const struct ub_list *ub_list)
Get first entry of the ub_list.
void() ub_list_node_clear_h(struct ub_list_node *node, void *arg)
function to clean up node
Definition: ub_llist.h:109
void * data
Definition: ub_llist.h:76
uint32_t ub_list_count(const struct ub_list *ub_list)
Get number of entries.
void ub_list_insert_before(struct ub_list *ub_list, struct ub_list_node *refnode, struct ub_list_node *node)
Append a node before a reference node.
struct ub_list_node * tail
Definition: ub_llist.h:89
struct ub_list_node * head
Definition: ub_llist.h:88
void ub_list_sort(struct ub_list *ub_list, ub_list_sort_h *sh, void *arg)
Sort entries in the ub_list based on comparator.
void ub_list_insert_after(struct ub_list *ub_list, struct ub_list_node *refnode, struct ub_list_node *node)
Append a node after a reference node.
static void * ub_list_nodedata(const struct ub_list_node *node)
Get data of node.
Definition: ub_llist.h:218
ub_list node structure
Definition: ub_llist.h:73
void ub_list_init(struct ub_list *ub_list)
Initialize ub_list.
void ub_list_unlink(struct ub_list *ub_list, struct ub_list_node *node)
Remove a node from the ub_list.
uint32_t count
Definition: ub_llist.h:90
struct ub_list_node * prev
Definition: ub_llist.h:74
struct ub_list_node * next
Definition: ub_llist.h:75