summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/thread.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-22 11:15:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:45 +0200
commit383cf42217d05a9cf19c6d081d50f92b2262a308 (patch)
tree0ee3fb9e007b2028a357a14056ed4e337886313b /cpukit/score/include/rtems/score/thread.h
parentscore: Add Thread_queue_Operations (diff)
downloadrtems-383cf42217d05a9cf19c6d081d50f92b2262a308.tar.bz2
score: More thread queue operations
Move thread queue discipline specific operations into Thread_queue_Operations. Use a separate node in the thread control block for the thread queue to make it independent of the scheduler data structures. Update #2273.
Diffstat (limited to 'cpukit/score/include/rtems/score/thread.h')
-rw-r--r--cpukit/score/include/rtems/score/thread.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index bce6f5643e..b6662e49af 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -286,6 +286,21 @@ typedef unsigned int Thread_Wait_flags;
* blocked and to return information to it.
*/
typedef struct {
+ /**
+ * @brief Node for thread queues.
+ */
+ union {
+ /**
+ * @brief A node for chains.
+ */
+ Chain_Node Chain;
+
+ /**
+ * @brief A node for red-black trees.
+ */
+ RBTree_Node RBTree;
+ } Node;
+
/** This field is the Id of the object this thread is waiting upon. */
Objects_Id id;
/** This field is used to return an integer while when blocked. */
@@ -349,8 +364,6 @@ typedef struct {
typedef struct {
/** This field is the object management structure for each proxy. */
Objects_Control Object;
- /** This field is used to enqueue the thread on RBTrees. */
- RBTree_Node RBNode;
/** This field is the current execution state of this proxy. */
States_Control current_state;
/** This field is the current priority state of this proxy. */
@@ -638,8 +651,6 @@ typedef struct {
struct Thread_Control_struct {
/** This field is the object management structure for each thread. */
Objects_Control Object;
- /** This field is used to enqueue the thread on RBTrees. */
- RBTree_Node RBNode;
/** This field is the current execution state of this thread. */
States_Control current_state;
/** This field is the current priority state of this thread. */