summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulersimple.c
diff options
context:
space:
mode:
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;
}