diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-18 08:47:26 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-04 13:36:09 +0100 |
commit | 3c103ba3064bed1bbabe34fc2072620170512a9f (patch) | |
tree | ce854c928513885f48243a754a2ec1a6de9ae564 /cpukit/score/include | |
parent | score: Add _SMP_Online_processors (diff) | |
download | rtems-3c103ba3064bed1bbabe34fc2072620170512a9f.tar.bz2 |
score: Add _Per_CPU_Is_boot_processor()
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/percpu.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h index 2b05b7815e..19f46d2725 100644 --- a/cpukit/score/include/rtems/score/percpu.h +++ b/cpukit/score/include/rtems/score/percpu.h @@ -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 ) |