ChibiOS/RT  6.1.4
chlists.h File Reference

Lists and Queues header. More...

Go to the source code of this file.

Data Structures

struct  ch_list
 Structure representing a generic single link list header and element. More...
 
struct  ch_queue
 Structure representing a generic bidirectional linked list header and element. More...
 
struct  ch_priority_queue
 Structure representing a generic priority-ordered bidirectional linked list header and element. More...
 

Macros

#define _CH_QUEUE_DATA(name)   {(ch_queue_t *)&name, (ch_queue_t *)&name}
 Data part of a static queue object initializer. More...
 
#define CH_QUEUE_DECL(name)   ch_queue_t name = _CH_QUEUE_DATA(name)
 Static queue object initializer. More...
 

Typedefs

typedef struct ch_list ch_list_t
 Type of a generic single link list header and element. More...
 
typedef struct ch_queue ch_queue_t
 Type of a generic bidirectional linked list header and element. More...
 
typedef struct ch_priority_queue ch_priority_queue_t
 Type of a generic priority-ordered bidirectional linked list header and element. More...
 

Functions

static void ch_list_init (ch_list_t *lp)
 List initialization. More...
 
static bool ch_list_isempty (ch_list_t *lp)
 Evaluates to true if the specified list is empty. More...
 
static bool ch_list_notempty (ch_list_t *lp)
 Evaluates to true if the specified list is not empty. More...
 
static void ch_list_push (ch_list_t *p, ch_list_t *lp)
 Pushes an element on top of a stack list. More...
 
static ch_list_tch_list_pop (ch_list_t *lp)
 Pops an element from the top of a stack list and returns it. More...
 
static void ch_queue_init (ch_queue_t *qp)
 Queue initialization. More...
 
static bool ch_queue_isempty (const ch_queue_t *qp)
 Evaluates to true if the specified queue is empty. More...
 
static bool ch_queue_notempty (const ch_queue_t *qp)
 Evaluates to true if the specified queue is not empty. More...
 
static void ch_queue_insert (ch_queue_t *p, ch_queue_t *qp)
 Inserts an element into a queue. More...
 
static ch_queue_tch_queue_fifo_remove (ch_queue_t *qp)
 Removes the first-out element from a queue and returns it. More...
 
static ch_queue_tch_queue_lifo_remove (ch_queue_t *qp)
 Removes the last-out element from a queue and returns it. More...
 
static ch_queue_tch_queue_dequeue (ch_queue_t *p)
 Removes an element from a queue and returns it. More...
 
static void ch_pqueue_init (ch_priority_queue_t *pqp)
 Priority queue initialization. More...
 
static ch_priority_queue_tch_pqueue_remove_highest (ch_priority_queue_t *pqp)
 Removes the highest priority element from a priority queue and returns it. More...
 
static ch_priority_queue_tch_pqueue_insert_behind (ch_priority_queue_t *pqp, ch_priority_queue_t *p)
 Inserts an element in the priority queue placing it behind its peers. More...
 
static ch_priority_queue_tch_pqueue_insert_ahead (ch_priority_queue_t *pqp, ch_priority_queue_t *p)
 Inserts an element in the priority queue placing it ahead of its peers. More...
 

Detailed Description

Lists and Queues header.

Definition in file chlists.h.