diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-09 21:30:40 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:37:11 +0200 |
commit | 99fc1d1d1b44e70a0bed4c94a514bd3f3b5df64f (patch) | |
tree | 3d290aed9fb42872d1ec6457025eb66a7303dec5 /cpukit/score/include/rtems/score/scheduleredf.h | |
parent | score: Modify release job scheduler operation (diff) | |
download | rtems-99fc1d1d1b44e70a0bed4c94a514bd3f3b5df64f.tar.bz2 |
score: Rework EDF scheduler
Use inline red-black tree insert. Do not use shifting priorities since
this is not supported by the thread queues. Due to the 32-bit
Priority_Control this currently limits the uptime to 49days with a 1ms
clock tick.
Update #2173.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/scheduleredf.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h index feaa2efa62..4eb5f49d4b 100644 --- a/cpukit/score/include/rtems/score/scheduleredf.h +++ b/cpukit/score/include/rtems/score/scheduleredf.h @@ -35,7 +35,7 @@ extern "C" { */ /**@{*/ -#define SCHEDULER_EDF_MAXIMUM_PRIORITY 255 +#define SCHEDULER_EDF_MAXIMUM_PRIORITY 0x7fffffff /** * Entry points for the Earliest Deadline First Scheduler. @@ -82,18 +82,6 @@ typedef struct { } Scheduler_EDF_Context; /** - * @typedef Scheduler_EDF_Queue_state - * - * This enumeration distiguishes state of a thread with respect to the - * ready queue. - */ -typedef enum { - SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY, - SCHEDULER_EDF_QUEUE_STATE_YES, - SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN -} Scheduler_EDF_Queue_state; - -/** * @brief Scheduler node specialization for EDF schedulers. */ typedef struct { @@ -110,10 +98,17 @@ typedef struct { * Rbtree node related to this thread. */ RBTree_Node Node; + + /** + * @brief The thread priority used by this scheduler instance in case no job + * is released. + */ + Priority_Control background_priority; + /** - * State of the thread with respect to ready queue. + * @brief The thread priority currently used by this scheduler instance. */ - Scheduler_EDF_Queue_state queue_state; + Priority_Control current_priority; } Scheduler_EDF_Node; /** |