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. --- testsuites/tmtests/tm27/task1.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'testsuites/tmtests/tm27') diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c index 0062a7302f..d7ebfbe224 100644 --- a/testsuites/tmtests/tm27/task1.c +++ b/testsuites/tmtests/tm27/task1.c @@ -20,6 +20,7 @@ #define CONFIGURE_INIT #include "system.h" +#include #include #define _RTEMS_TMTEST27 @@ -101,10 +102,10 @@ rtems_task Task_1( rtems_task_argument argument ) { + Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance(); #if defined(RTEMS_SMP) rtems_interrupt_level level; #endif - Chain_Control *ready_queues; Install_tm27_vector( Isr_handler ); @@ -185,9 +186,8 @@ rtems_task Task_1( _ISR_Disable_without_giant(level); #endif - ready_queues = (Chain_Control *) _Scheduler.information; _Thread_Executing = - (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]); + (Thread_Control *) _Chain_First(&scheduler->Ready[LOW_PRIORITY]); _Thread_Dispatch_necessary = 1; @@ -219,10 +219,10 @@ rtems_task Task_2( rtems_task_argument argument ) { + Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance(); #if defined(RTEMS_SMP) rtems_interrupt_level level; #endif - Chain_Control *ready_queues; #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); @@ -255,9 +255,8 @@ rtems_task Task_2( rtems_interrupt_disable(level); #endif - ready_queues = (Chain_Control *) _Scheduler.information; _Thread_Executing = - (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]); + (Thread_Control *) _Chain_First(&scheduler->Ready[LOW_PRIORITY]); _Thread_Dispatch_necessary = 1; -- cgit v1.2.3