From 18d45d9d25beceedcc3e34eea3d28f87fa200e76 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 11 Apr 2019 12:10:53 +0200 Subject: score: Add _ISR_lock_Set_name() Add _ISR_lock_Set_name() to optimize the initialization of zero-initialized locks. --- cpukit/score/src/smp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpukit/score/src/smp.c') 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 ); } -- cgit v1.2.3