ChibiOS/RT Architecture - Reference Manual - Guides |
Thread queues/lists macros and structures. More...
Go to the source code of this file.
Data Structures | |
struct | ThreadsQueue |
Generic threads bidirectional linked list header and element. More... | |
struct | ThreadsList |
Generic threads single link list, it works like a stack. More... | |
Defines | |
#define | queue_init(tqp) ((tqp)->p_next = (tqp)->p_prev = (Thread *)(tqp)); |
Threads queue initialization. | |
#define | list_init(tlp) ((tlp)->p_next = (Thread *)(tlp)) |
Threads list initialization. | |
#define | isempty(p) ((p)->p_next == (Thread *)(p)) |
Evaluates to TRUE if the specified threads queue or list is empty. | |
#define | notempty(p) ((p)->p_next != (Thread *)(p)) |
Evaluates to TRUE if the specified threads queue or list is not empty. | |
#define | _THREADSQUEUE_DATA(name) {(Thread *)&name, (Thread *)&name} |
Data part of a static threads queue initializer. | |
#define | THREADSQUEUE_DECL(name) ThreadsQueue name = _THREADSQUEUE_DATA(name) |
Static threads queue initializer. | |
Functions | |
void | prio_insert (Thread *tp, ThreadsQueue *tqp) |
Inserts a thread into a priority ordered queue. | |
void | queue_insert (Thread *tp, ThreadsQueue *tqp) |
Inserts a Thread into a queue. | |
Thread * | fifo_remove (ThreadsQueue *tqp) |
Removes the first-out Thread from a queue and returns it. | |
Thread * | lifo_remove (ThreadsQueue *tqp) |
Removes the last-out Thread from a queue and returns it. | |
Thread * | dequeue (Thread *tp) |
Removes a Thread from a queue and returns it. | |
void | list_insert (Thread *tp, ThreadsList *tlp) |
Pushes a Thread on top of a stack list. | |
Thread * | list_remove (ThreadsList *tlp) |
Pops a Thread from the top of a stack list and returns it. |
Thread queues/lists macros and structures.
Definition in file chlists.h.