diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-16 20:34:59 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-06-23 10:28:49 +0200 |
commit | 5dffbc424e7aac75e3704418c7d5a8b94cdd5ac8 (patch) | |
tree | 350d36d33411afb83abacd0aa9921bfb1966c5ed /cpukit/score/src/watchdogtick.c | |
parent | kern_tc.c: Provide a weak hardpps() implementation (diff) | |
download | rtems-5dffbc424e7aac75e3704418c7d5a8b94cdd5ac8.tar.bz2 |
score: Make SMP only code explicit
Conditional expressions with inline functions are not optimized away if
optimization is disabled. Avoid such expressions to prevent dead
branches. It helps also during code review to immediately see if a loop
is used or not.
Diffstat (limited to 'cpukit/score/src/watchdogtick.c')
-rw-r--r-- | cpukit/score/src/watchdogtick.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/score/src/watchdogtick.c b/cpukit/score/src/watchdogtick.c index 6edb3f071a..71311b598e 100644 --- a/cpukit/score/src/watchdogtick.c +++ b/cpukit/score/src/watchdogtick.c @@ -83,9 +83,13 @@ void _Watchdog_Tick( Per_CPU_Control *cpu ) Thread_Control *executing; const Thread_CPU_budget_operations *cpu_budget_operations; +#ifdef RTEMS_SMP if ( _Per_CPU_Is_boot_processor( cpu ) ) { +#endif ++_Watchdog_Ticks_since_boot; +#ifdef RTEMS_SMP } +#endif _ISR_lock_ISR_disable_and_acquire( &cpu->Watchdog.Lock, &lock_context ); |