summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/scheduleredfupdate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-13 16:03:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-14 14:46:19 +0200
commitbeab7329fca655c93743fbb590d00bb4ea5a6d78 (patch)
treefbeb6b27f887b46a41f84acc64aecfce18686540 /cpukit/score/src/scheduleredfupdate.c
parentscore: Scheduler documentation (diff)
downloadrtems-beab7329fca655c93743fbb590d00bb4ea5a6d78.tar.bz2
score: Introduce scheduler nodes
Rename scheduler per-thread information into scheduler nodes using Scheduler_Node as the base type. Use inheritance for specialized schedulers. Move the scheduler specific states from the thread control block into the scheduler node structure. Validate the SMP scheduler node state transitions in case RTEMS_DEBUG is defined.
Diffstat (limited to 'cpukit/score/src/scheduleredfupdate.c')
-rw-r--r--cpukit/score/src/scheduleredfupdate.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/cpukit/score/src/scheduleredfupdate.c b/cpukit/score/src/scheduleredfupdate.c
index 88d6d9d7d4..99a3e0e3f6 100644
--- a/cpukit/score/src/scheduleredfupdate.c
+++ b/cpukit/score/src/scheduleredfupdate.c
@@ -18,28 +18,22 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/scheduleredf.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/scheduleredfimpl.h>
void _Scheduler_EDF_Update(
const Scheduler_Control *scheduler,
Thread_Control *the_thread
)
{
- Scheduler_EDF_Per_thread *sched_info =
- (Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
+ Scheduler_EDF_Node *node = _Scheduler_EDF_Node_get( the_thread );
(void) scheduler;
- if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
+ if (node->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
the_thread->real_priority = the_thread->Start.initial_priority;
the_thread->current_priority = the_thread->Start.initial_priority;
- sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
+ node->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
}