55 #if !defined(__AMXC_LQUEUE_H__)
56 #define __AMXC_LQUEUE_H__
Ambiorix linked list API header file.
int amxc_llist_it_init(amxc_llist_it_t *const it)
Initializes a linked list iterator.
void amxc_llist_delete(amxc_llist_t **llist, amxc_llist_it_delete_t func)
Frees the previously allocated linked list.
size_t amxc_llist_size(const amxc_llist_t *const llist)
Calculates the size of the linked list.
int amxc_llist_new(amxc_llist_t **llist)
Allocates a linked list.
int amxc_llist_append(amxc_llist_t *const llist, amxc_llist_it_t *const it)
Adds an item to the end of the linked list.
int amxc_llist_init(amxc_llist_t *const llist)
Initializes a linked list.
bool amxc_llist_is_empty(const amxc_llist_t *const llist)
Checks that the linked list is empty.
void amxc_llist_clean(amxc_llist_t *const llist, amxc_llist_it_delete_t func)
Removes all items from the linked list.
AMXC_INLINE amxc_llist_it_t * amxc_llist_take_first(amxc_llist_t *const llist)
Removes the first item from the linked list.
void(* amxc_llist_it_delete_t)(amxc_llist_it_t *it)
Definition of the linked list item delete function.
amxc_llist_it_delete_t amxc_lqueue_it_delete_t
Definition of the item delete function.
AMXC_INLINE bool amxc_lqueue_is_empty(const amxc_lqueue_t *const lqueue)
Checks that the linked queue is empty.
AMXC_INLINE int amxc_lqueue_new(amxc_lqueue_t **lqueue)
Allocates a linked queue.
AMXC_INLINE int amxc_lqueue_it_init(amxc_lqueue_it_t *const it)
Initializes a linked queue iterator.
amxc_llist_t amxc_lqueue_t
The linked queue structure.
AMXC_INLINE void amxc_lqueue_clean(amxc_lqueue_t *const lqueue, amxc_lqueue_it_delete_t func)
Removes all items from the linked queue.
AMXC_INLINE size_t amxc_lqueue_size(const amxc_lqueue_t *const lqueue)
Calculates the size of the queue, expressed in number of items.
amxc_llist_it_t amxc_lqueue_it_t
The linked queue iterator structure.
AMXC_INLINE amxc_lqueue_it_t * amxc_lqueue_remove(amxc_lqueue_t *const lqueue)
Removes the first added item from the queue.
AMXC_INLINE int amxc_lqueue_init(amxc_lqueue_t *const lqueue)
Initializes a linked queue.
AMXC_INLINE int amxc_lqueue_add(amxc_lqueue_t *const lqueue, amxc_lqueue_it_t *const it)
Adds an item to the linked queue.
AMXC_INLINE void amxc_lqueue_delete(amxc_lqueue_t **lqueue, amxc_lqueue_it_delete_t func)
Frees the previously allocated linked queue.
The linked list iterator structure.
The linked list structure.
static amxc_htable_it_t it[2000]