From 494c2e300215c4bc539d243d6a5d060e0e2f2ef2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 1 Apr 2014 11:48:59 +0200 Subject: score: Move priority bit map to scheduler instance Delete global variables _Priority_Major_bit_map and _Priority_Bit_map. This makes it possible to use multiple priority scheduler instances for example with clustered/partitioned scheduling on SMP. --- cpukit/score/src/schedulerpriority.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cpukit/score/src/schedulerpriority.c') diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c index f393f4f59b..9d1755d024 100644 --- a/cpukit/score/src/schedulerpriority.c +++ b/cpukit/score/src/schedulerpriority.c @@ -23,12 +23,12 @@ void _Scheduler_priority_Initialize(void) { - /* allocate ready queue structures */ - Chain_Control *ready_queues = _Workspace_Allocate_or_fatal_error( - ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) + Scheduler_priority_Control *self = _Workspace_Allocate_or_fatal_error( + sizeof( *self ) + PRIORITY_MAXIMUM * sizeof( Chain_Control ) ); - _Scheduler_priority_Ready_queue_initialize( ready_queues ); + _Priority_bit_map_Initialize( &self->Bit_map ); + _Scheduler_priority_Ready_queue_initialize( &self->Ready[ 0 ] ); - _Scheduler.information = ready_queues; + _Scheduler.information = self; } -- cgit v1.2.3