ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

Data Structures | Defines | Functions

chlists.h File Reference

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.
Threadfifo_remove (ThreadsQueue *tqp)
 Removes the first-out Thread from a queue and returns it.
Threadlifo_remove (ThreadsQueue *tqp)
 Removes the last-out Thread from a queue and returns it.
Threaddequeue (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.
Threadlist_remove (ThreadsList *tlp)
 Pops a Thread from the top of a stack list and returns it.

Detailed Description

Thread queues/lists macros and structures.

Note:
All the macros present in this module, while public, are not an OS API and should not be directly used in the user applications code.

Definition in file chlists.h.


Generated on Sun Nov 28 2010 14:09:49 for ChibiOS/RT by doxygen 1.7.1