From 729cf694e863c88fe0f27ed135c1721fff4c266f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 30 Jun 2016 06:27:51 +0200 Subject: bsps: Do not use fast idle clock for SMP We may have more than one idle thread. Thus, the clock driver fast idle logic would be a bit more complicated. --- c/src/lib/libbsp/shared/clockdrv_shell.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.h b/c/src/lib/libbsp/shared/clockdrv_shell.h index 6609f5ea9b..47658732b4 100644 --- a/c/src/lib/libbsp/shared/clockdrv_shell.h +++ b/c/src/lib/libbsp/shared/clockdrv_shell.h @@ -137,19 +137,21 @@ rtems_isr Clock_isr( Clock_driver_timecounter_tick(); - while ( - _Thread_Heir == _Thread_Executing - && _Thread_Executing->Start.Entry.Kinds.Idle.entry - == rtems_configuration_get_idle_task() - ) { - ISR_lock_Context lock_context; - - _Timecounter_Acquire(&lock_context); - _Timecounter_Tick_simple( - interval, - (*tc->tc_get_timecount)(tc), - &lock_context - ); + if (!rtems_configuration_is_smp_enabled()) { + while ( + _Thread_Heir == _Thread_Executing + && _Thread_Executing->Start.Entry.Kinds.Idle.entry + == rtems_configuration_get_idle_task() + ) { + ISR_lock_Context lock_context; + + _Timecounter_Acquire(&lock_context); + _Timecounter_Tick_simple( + interval, + (*tc->tc_get_timecount)(tc), + &lock_context + ); + } } Clock_driver_support_at_tick(); -- cgit v1.2.3