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/kern_tc.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 '')
-rw-r--r-- | cpukit/score/src/kern_tc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 2b7aeaad31..643026a1c8 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -2329,9 +2329,13 @@ _Timecounter_Tick(void) { Per_CPU_Control *cpu_self = _Per_CPU_Get(); +#if defined(RTEMS_SMP) if (_Per_CPU_Is_boot_processor(cpu_self)) { +#endif tc_windup(NULL); +#if defined(RTEMS_SMP) } +#endif _Watchdog_Tick(cpu_self); } |