summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-09-01 10:38:17 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-09-04 13:14:54 +0200
commitc4db18a0bb4f3c56b69398bfea63924ac2cdd0aa (patch)
tree630cead3590bcd97b3a95af0b6519787844bf967
parentsmp: Documentation (diff)
downloadrtems-c4db18a0bb4f3c56b69398bfea63924ac2cdd0aa.tar.bz2
score: Documentation
-rw-r--r--cpukit/score/include/rtems/score/threadq.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index 8f2b138709..06ba9f3f9d 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -44,6 +44,13 @@ typedef struct _Thread_Control Thread_Control;
/**
* @brief Thread queue heads.
*
+ * Each thread is equipped with spare thread queue heads in case it is not
+ * enqueued on a thread queue. The first thread enqueued on a thread queue
+ * will give its spare thread queue heads to that thread queue. The threads
+ * arriving at the queue will add their thread queue heads to the free chain of
+ * the queue heads provided by the first thread enqueued. Once a thread is
+ * dequeued it use the free chain to get new spare thread queue heads.
+ *
* Uses a leading underscore in the structure name to allow forward
* declarations in standard header files provided by Newlib and GCC.
*/
@@ -52,18 +59,38 @@ typedef struct _Thread_queue_Heads {
* set of tasks which varies based upon the discipline.
*/
union {
- /** This is the FIFO discipline list. */
+ /**
+ * @brief This is the FIFO discipline list.
+ */
Chain_Control Fifo;
- /** This is the set of threads for priority discipline waiting. */
+
+ /**
+ * @brief This is the set of threads for priority discipline waiting.
+ */
RBTree_Control Priority;
} Heads;
+ /**
+ * @brief A chain with free thread queue heads providing the spare thread
+ * queue heads for a thread once it is dequeued.
+ */
Chain_Control Free_chain;
+ /**
+ * @brief A chain node to add these thread queue heads to the free chain of
+ * the thread queue heads dedicated to the thread queue of an object.
+ */
Chain_Node Free_node;
} Thread_queue_Heads;
typedef struct {
+ /**
+ * @brief The thread queue heads.
+ *
+ * This pointer is NULL, if and only if no threads are enqueued. The first
+ * thread to enqueue will give its spare thread queue heads to this thread
+ * queue.
+ */
Thread_queue_Heads *heads;
/**