summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerpriority.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-04 10:56:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 08:37:11 +0200
commite1598a616db1e9dadfd74abeb20b1f1ec5daaa7f (patch)
tree0aabc512f4beb2b30eba7885926d06a878988855 /cpukit/score/src/schedulerpriority.c
parentscore: Add and use RTEMS_ZERO_LENGTH_ARRAY (diff)
downloadrtems-e1598a616db1e9dadfd74abeb20b1f1ec5daaa7f.tar.bz2
score: Static scheduler configuration
Do not allocate the scheduler control structures from the workspace. This is a preparation step for configuration of clustered/partitioned schedulers on SMP.
Diffstat (limited to 'cpukit/score/src/schedulerpriority.c')
-rw-r--r--cpukit/score/src/schedulerpriority.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c
index 9d1755d024..6dc055a536 100644
--- a/cpukit/score/src/schedulerpriority.c
+++ b/cpukit/score/src/schedulerpriority.c
@@ -21,14 +21,11 @@
#include <rtems/score/schedulerpriorityimpl.h>
#include <rtems/score/wkspace.h>
-void _Scheduler_priority_Initialize(void)
+void _Scheduler_priority_Initialize( const Scheduler_Control *scheduler )
{
- Scheduler_priority_Control *self = _Workspace_Allocate_or_fatal_error(
- sizeof( *self ) + PRIORITY_MAXIMUM * sizeof( Chain_Control )
- );
+ Scheduler_priority_Context *context =
+ _Scheduler_priority_Get_context( scheduler );
- _Priority_bit_map_Initialize( &self->Bit_map );
- _Scheduler_priority_Ready_queue_initialize( &self->Ready[ 0 ] );
-
- _Scheduler.information = self;
+ _Priority_bit_map_Initialize( &context->Bit_map );
+ _Scheduler_priority_Ready_queue_initialize( &context->Ready[ 0 ] );
}