summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadq.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-07-07 14:26:13 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-07-15 12:43:44 -0500
commited7a02895e3bedda5edb33c91f0ffc956e9cab06 (patch)
tree0266870aab25e0eca278237aca3e11a621a12c9e /cpukit/score/include/rtems/score/threadq.h
parentrbtree: Reduce RBTree_Control size (diff)
downloadrtems-ed7a02895e3bedda5edb33c91f0ffc956e9cab06.tar.bz2
Thread Queue Priority Discipline Reimplemented with RBTree
Diffstat (limited to 'cpukit/score/include/rtems/score/threadq.h')
-rw-r--r--cpukit/score/include/rtems/score/threadq.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/cpukit/score/include/rtems/score/threadq.h b/cpukit/score/include/rtems/score/threadq.h
index c8f2aa44bf..35e0f1d617 100644
--- a/cpukit/score/include/rtems/score/threadq.h
+++ b/cpukit/score/include/rtems/score/threadq.h
@@ -8,7 +8,7 @@
*/
/*
- * COPYRIGHT (c) 1989-2008.
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,6 +22,7 @@
#include <rtems/score/chain.h>
#include <rtems/score/states.h>
#include <rtems/score/threadsync.h>
+#include <rtems/score/rbtree.h>
#ifdef __cplusplus
extern "C" {
@@ -48,22 +49,6 @@ typedef enum {
} Thread_queue_Disciplines;
/**
- * This is one of the constants used to manage the priority queues.
- *
- * There are four chains used to maintain a priority -- each chain
- * manages a distinct set of task priorities. The number of chains
- * is determined by TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS.
- * The following set must be consistent.
- *
- * The set below configures 4 headers -- each contains 64 priorities.
- * Header x manages priority range (x*64) through ((x*64)+63). If
- * the priority is more than half way through the priority range it
- * is in, then the search is performed from the rear of the chain.
- * This halves the search time to find the insertion point.
- */
-#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4
-
-/**
* This is the structure used to manage sets of tasks which are blocked
* waiting to acquire a resource.
*/
@@ -74,8 +59,8 @@ typedef struct {
union {
/** This is the FIFO discipline list. */
Chain_Control Fifo;
- /** This is the set of lists for priority discipline waiting. */
- Chain_Control Priority[TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS];
+ /** This is the set of threads for priority discipline waiting. */
+ RBTree_Control Priority;
} Queues;
/** This field is used to manage the critical section. */
Thread_blocking_operation_States sync_state;