summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulersimplesmp.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-12 10:32:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-20 10:14:04 +0200
commit9d83f58ab8208b49a4e27d4ff077cf526f902477 (patch)
tree93ef828f12d6edf27104fc4a313520f1649fec9a /cpukit/score/src/schedulersimplesmp.c
parentscore: Add _Priority_bit_map_Is_empty() (diff)
downloadrtems-9d83f58ab8208b49a4e27d4ff077cf526f902477.tar.bz2
smp: Replace Scheduler_simple_smp_Control
Replace Scheduler_simple_smp_Control with Scheduler_SMP_Control. Rename _Scheduler_simple_smp_Instance() to _Scheduler_SMP_Instance().
Diffstat (limited to 'cpukit/score/src/schedulersimplesmp.c')
-rw-r--r--cpukit/score/src/schedulersimplesmp.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index e26151025c..090572302e 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -20,19 +20,15 @@
#include <rtems/score/schedulersimplesmp.h>
#include <rtems/score/schedulersimpleimpl.h>
+#include <rtems/score/schedulersmpimpl.h>
#include <rtems/score/wkspace.h>
-static Scheduler_simple_smp_Control *_Scheduler_simple_smp_Instance( void )
-{
- return _Scheduler.information;
-}
-
void _Scheduler_simple_smp_Initialize( void )
{
- Scheduler_simple_smp_Control *self =
+ Scheduler_SMP_Control *self =
_Workspace_Allocate_or_fatal_error( sizeof( *self ) );
- _Chain_Initialize_empty( &self->ready );
+ _Chain_Initialize_empty( &self->ready[ 0 ] );
_Chain_Initialize_empty( &self->scheduled );
_Scheduler.information = self;
@@ -112,7 +108,7 @@ static void _Scheduler_simple_smp_Enqueue_ordered(
Chain_Node_order order
)
{
- Scheduler_simple_smp_Control *self = _Scheduler_simple_smp_Instance();
+ Scheduler_SMP_Control *self = _Scheduler_SMP_Instance();
/*
* The scheduled chain has exactly processor count nodes after
@@ -127,11 +123,11 @@ static void _Scheduler_simple_smp_Enqueue_ordered(
_Scheduler_simple_smp_Insert( &self->scheduled, thread, order );
_Scheduler_simple_smp_Move_from_scheduled_to_ready(
- &self->ready,
+ &self->ready[ 0 ],
lowest_scheduled
);
} else {
- _Scheduler_simple_smp_Insert( &self->ready, thread, order );
+ _Scheduler_simple_smp_Insert( &self->ready[ 0 ], thread, order );
}
}
@@ -153,13 +149,13 @@ void _Scheduler_simple_smp_Enqueue_priority_fifo( Thread_Control *thread )
void _Scheduler_simple_smp_Extract( Thread_Control *thread )
{
- Scheduler_simple_smp_Control *self = _Scheduler_simple_smp_Instance();
+ Scheduler_SMP_Control *self = _Scheduler_SMP_Instance();
_Chain_Extract_unprotected( &thread->Object.Node );
if ( thread->is_scheduled ) {
Thread_Control *highest_ready =
- (Thread_Control *) _Chain_First( &self->ready );
+ (Thread_Control *) _Chain_First( &self->ready[ 0 ] );
_Scheduler_simple_smp_Allocate_processor( highest_ready, thread );
@@ -192,7 +188,7 @@ void _Scheduler_simple_smp_Start_idle(
Per_CPU_Control *cpu
)
{
- Scheduler_simple_smp_Control *self = _Scheduler_simple_smp_Instance();
+ Scheduler_SMP_Control *self = _Scheduler_SMP_Instance();
thread->is_scheduled = true;
thread->cpu = cpu;