summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/smpimpl.h11
-rw-r--r--cpukit/score/src/smp.c12
2 files changed, 20 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h
index dca8a6bec8..98e109cba2 100644
--- a/cpukit/score/include/rtems/score/smpimpl.h
+++ b/cpukit/score/include/rtems/score/smpimpl.h
@@ -171,6 +171,17 @@ static inline void _SMP_Inter_processor_interrupt_handler( void )
}
/**
+ * @brief Returns true, if the processor with the specified index should be
+ * started.
+ *
+ * @param[in] cpu_index The processor index.
+ *
+ * @retval true The processor should be started.
+ * @retval false Otherwise.
+ */
+bool _SMP_Should_start_processor( uint32_t cpu_index );
+
+/**
* @brief Sends a SMP message to a processor.
*
* The target processor may be the sending processor.
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 );
}