From 2a4f9d7f187d22e8e3fc80acc20044ab80987e68 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Dec 2014 08:28:24 +0100 Subject: smp: Add and use _SMP_Should_start_processor() --- cpukit/score/src/smp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/smp.c') diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 09246e3a8c..ae10f82419 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -118,18 +118,24 @@ void _SMP_Request_start_multitasking( void ) } } +bool _SMP_Should_start_processor( uint32_t cpu_index ) +{ + const Scheduler_Assignment *assignment = + _Scheduler_Get_assignment( cpu_index ); + + return _Scheduler_Should_start_processor( assignment ); +} + void _SMP_Start_multitasking_on_secondary_processor( void ) { Per_CPU_Control *self_cpu = _Per_CPU_Get(); uint32_t cpu_index_self = _Per_CPU_Get_index( self_cpu ); - const Scheduler_Assignment *assignment = - _Scheduler_Get_assignment( cpu_index_self ); if ( cpu_index_self >= rtems_configuration_get_maximum_processors() ) { _SMP_Fatal( SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR ); } - if ( !_Scheduler_Should_start_processor( assignment ) ) { + if ( !_SMP_Should_start_processor( cpu_index_self ) ) { _SMP_Fatal( SMP_FATAL_MULTITASKING_START_ON_UNASSIGNED_PROCESSOR ); } -- cgit v1.2.3