summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulersimple.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-03 12:02:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-04 11:01:18 +0200
commit439c494fe20f474984c22a333613c33fac5585eb (patch)
tree6923313f5eb446e2bdbb7b9a340c7b32205b93d7 /cpukit/score/src/schedulersimple.c
parentscore: Add and use Scheduler_EDF_Control (diff)
downloadrtems-439c494fe20f474984c22a333613c33fac5585eb.tar.bz2
score: Add and use Scheduler_simple_Control
Diffstat (limited to 'cpukit/score/src/schedulersimple.c')
-rw-r--r--cpukit/score/src/schedulersimple.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/cpukit/score/src/schedulersimple.c b/cpukit/score/src/schedulersimple.c
index 8ea8b538dc..b825b29014 100644
--- a/cpukit/score/src/schedulersimple.c
+++ b/cpukit/score/src/schedulersimple.c
@@ -25,16 +25,10 @@
void _Scheduler_simple_Initialize ( void )
{
- void *f;
+ Scheduler_simple_Control *scheduler =
+ _Workspace_Allocate_or_fatal_error( sizeof( *scheduler ) );
- /*
- * Initialize Ready Queue
- */
+ _Chain_Initialize_empty( &scheduler->Ready );
- /* allocate ready queue structures */
- f = _Workspace_Allocate_or_fatal_error( sizeof(Chain_Control) );
- _Scheduler.information = f;
-
- /* initialize ready queue structure */
- _Chain_Initialize_empty( (Chain_Control *)f );
+ _Scheduler.information = scheduler;
}