diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-12-23 08:28:24 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-01-09 14:03:32 +0100 |
commit | 2a4f9d7f187d22e8e3fc80acc20044ab80987e68 (patch) | |
tree | 6104bd2d3528d92ccd06787fa7ddca96afc1d37f /cpukit/score/src/smp.c | |
parent | capture: Fix lock initialization (diff) | |
download | rtems-2a4f9d7f187d22e8e3fc80acc20044ab80987e68.tar.bz2 |
smp: Add and use _SMP_Should_start_processor()
Diffstat (limited to 'cpukit/score/src/smp.c')
-rw-r--r-- | cpukit/score/src/smp.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 ); } |