diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-04-11 12:10:53 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-04-12 09:12:03 +0200 |
commit | 18d45d9d25beceedcc3e34eea3d28f87fa200e76 (patch) | |
tree | f27c51849fe3ae495f60e015602d7f4418be5f56 /cpukit/score | |
parent | score: Remove unused macros (diff) | |
download | rtems-18d45d9d25beceedcc3e34eea3d28f87fa200e76.tar.bz2 |
score: Add _ISR_lock_Set_name()
Add _ISR_lock_Set_name() to optimize the initialization of
zero-initialized locks.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/src/smp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 780b33c740..822ecfd4ff 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -114,11 +114,12 @@ void _SMP_Handler_initialize( void ) cpu_config_max = rtems_configuration_get_maximum_processors(); for ( cpu_index = 0 ; cpu_index < cpu_config_max; ++cpu_index ) { - Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index ); + Per_CPU_Control *cpu; - _ISR_lock_Initialize( &cpu->Watchdog.Lock, "Watchdog" ); + cpu = _Per_CPU_Get_by_index( cpu_index ); _SMP_ticket_lock_Initialize( &cpu->Lock ); _SMP_lock_Stats_initialize( &cpu->Lock_stats, "Per-CPU" ); + _ISR_lock_Set_name( &cpu->Watchdog.Lock, "Per-CPU Watchdog" ); _Chain_Initialize_empty( &cpu->Threads_in_need_for_help ); } |