score: Add _Per_CPU_Is_boot_processor()

This commit is contained in:
Sebastian Huber committed 2016-03-04 13:36:09 +01:00
1 parent b3a4c48ebd
commit 3c103ba306
2 files changed
+21

No files matched your search

+19
View File
@@ -365,6 +365,12 @@ typedef struct Per_CPU_Control {
* _CPU_SMP_Start_processor().
*/
bool online;
/**
* @brief Indicates if the processor is the one that performed the initial
* system initialization.
*/
bool boot;
#endif
Per_CPU_Stats Stats;
@@ -536,6 +542,19 @@ static inline bool _Per_CPU_Is_processor_online(
#endif
}
static inline bool _Per_CPU_Is_boot_processor(
const Per_CPU_Control *cpu
)
{
#if defined( RTEMS_SMP )
return cpu->boot;
#else
(void) cpu;
return true;
#endif
}
#if defined( RTEMS_SMP )
static inline void _Per_CPU_Send_interrupt( const Per_CPU_Control *cpu )
+2
View File
@@ -57,6 +57,8 @@ static void _SMP_Start_processors( uint32_t cpu_count )
} else {
started = true;
cpu->boot = true;
if ( !_Scheduler_Should_start_processor( assignment ) ) {
_SMP_Fatal( SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER );
}