ChibiOS/RT
6.1.4
|
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... | |
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... | |
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_t * | ch_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_t * | ch_queue_fifo_remove (ch_queue_t *qp) |
Removes the first-out element from a queue and returns it. More... | |
static ch_queue_t * | ch_queue_lifo_remove (ch_queue_t *qp) |
Removes the last-out element from a queue and returns it. More... | |
static ch_queue_t * | ch_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_t * | ch_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_t * | ch_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_t * | ch_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... | |
#define _CH_QUEUE_DATA | ( | name | ) | {(ch_queue_t *)&name, (ch_queue_t *)&name} |
#define CH_QUEUE_DECL | ( | name | ) | ch_queue_t name = _CH_QUEUE_DATA(name) |
typedef struct ch_queue ch_queue_t |
typedef struct ch_priority_queue ch_priority_queue_t |
|
inlinestatic |
List initialization.
[out] | lp | pointer to the list header |
Definition at line 138 of file chlists.h.
References ch_list::next.
Referenced by _thread_init().
|
inlinestatic |
Evaluates to true
if the specified list is empty.
[in] | lp | pointer to the list header |
Definition at line 151 of file chlists.h.
References ch_list::next.
|
inlinestatic |
Evaluates to true
if the specified list is not empty.
[in] | lp | pointer to the list header |
Definition at line 164 of file chlists.h.
References ch_list::next.
Referenced by chThdExitS().
Pushes an element on top of a stack list.
[in] | p | the pointer to the element to be inserted in the list |
[in] | lp | the pointer to the list header |
Definition at line 177 of file chlists.h.
References ch_list::next.
Referenced by chThdWait().
Pops an element from the top of a stack list and returns it.
[in] | lp | the pointer to the list header |
Definition at line 192 of file chlists.h.
References ch_list::next.
Referenced by chThdExitS().
|
inlinestatic |
Queue initialization.
[out] | qp | pointer to the queue header |
Definition at line 207 of file chlists.h.
References ch_queue::next, and ch_queue::prev.
Referenced by _thread_init(), chCondObjectInit(), chMtxObjectInit(), chSemObjectInit(), and chThdQueueObjectInit().
|
inlinestatic |
Evaluates to true
if the specified queue is empty.
[in] | qp | pointer to the queue header |
Definition at line 221 of file chlists.h.
References ch_queue::next.
Referenced by chSemAddCounterI(), chSemResetWithMessageI(), chSemSignal(), chSemSignalI(), chSemSignalWait(), chSemWaitS(), chSemWaitTimeoutS(), and chThdQueueIsEmptyI().
|
inlinestatic |
Evaluates to true
if the specified queue is not empty.
[in] | qp | pointer to the queue header |
Definition at line 234 of file chlists.h.
References ch_queue::next.
Referenced by chCondBroadcastI(), chCondSignal(), chCondSignalI(), chMtxQueueNotEmptyS(), chSemAddCounterI(), chSemResetWithMessageI(), chSemSignal(), chSemSignalI(), chSemSignalWait(), chSemWaitS(), chSemWaitTimeoutS(), chThdDequeueAllI(), chThdDequeueNextI(), and chThdDoDequeueNextI().
|
inlinestatic |
Inserts an element into a queue.
[in] | p | the pointer to the element to be inserted in the queue |
[in] | qp | the pointer to the queue header |
Definition at line 247 of file chlists.h.
References ch_queue::next, and ch_queue::prev.
Referenced by chThdEnqueueTimeoutS().
|
inlinestatic |
Removes the first-out element from a queue and returns it.
[in] | qp | the pointer to the queue list header |
Definition at line 265 of file chlists.h.
References ch_queue::next, and ch_queue::prev.
Referenced by chCondBroadcastI(), chCondSignal(), chCondSignalI(), chMsgPollS(), chMsgWaitS(), chMsgWaitTimeoutS(), chMtxUnlock(), chMtxUnlockAllS(), chMtxUnlockS(), chSemAddCounterI(), chSemSignal(), chSemSignalI(), chSemSignalWait(), and chThdDoDequeueNextI().
|
inlinestatic |
Removes the last-out element from a queue and returns it.
[in] | qp | the pointer to the queue list header |
Definition at line 284 of file chlists.h.
References ch_queue::next, and ch_queue::prev.
Referenced by chSemResetWithMessageI().
|
inlinestatic |
Removes an element from a queue and returns it.
The element is removed from the queue regardless of its relative position and regardless the used insertion method.
[in] | p | the pointer to the element to be removed from the queue |
Definition at line 303 of file chlists.h.
References ch_queue::next, and ch_queue::prev.
Referenced by chMtxLockS().
|
inlinestatic |
Priority queue initialization.
[out] | pqp | pointer to the priority queue header |
Definition at line 321 of file chlists.h.
References ch_priority_queue::next, and ch_priority_queue::prev.
Referenced by _scheduler_init().
|
inlinestatic |
Removes the highest priority element from a priority queue and returns it.
[in] | pqp | the pointer to the priority queue list header |
Definition at line 337 of file chlists.h.
References ch_priority_queue::next, and ch_priority_queue::prev.
Referenced by chSchDoReschedule(), chSchDoRescheduleAhead(), chSchDoRescheduleBehind(), and chSchGoSleepS().
|
inlinestatic |
Inserts an element in the priority queue placing it behind its peers.
The element is positioned behind all elements with higher or equal priority.
[in] | pqp | the pointer to the priority queue list header |
[in] | p | the pointer to the element to be inserted in the queue |
Definition at line 358 of file chlists.h.
References ch_priority_queue::next, and ch_priority_queue::prev.
Referenced by chSchReadyI().
|
inlinestatic |
Inserts an element in the priority queue placing it ahead of its peers.
The element is positioned ahead of all elements with higher or equal priority.
[in] | pqp | the pointer to the priority queue list header |
[in] | p | the pointer to the element to be inserted in the queue |
Definition at line 387 of file chlists.h.
References ch_priority_queue::next, and ch_priority_queue::prev.
Referenced by chSchReadyAheadI().