summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorGabriel Moyano <gabriel.moyano@dlr.de>2022-06-10 11:05:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-06-10 11:12:03 +0200
commit11621c9c521f7d9fe5e090a06f469b5d41e6be17 (patch)
tree12d283cf1369d6313e423bb97aaa8adf7303af5d /cpukit/score
parentbsps/imx: Enable clock of ETH2 (diff)
downloadrtems-11621c9c521f7d9fe5e090a06f469b5d41e6be17.tar.bz2
kern_tc.c: Update pps_event() for uniprocessor configurations
Since pps->capgen equal to zero is not a special value in uniprocessor configurations, there is no need to check for this condition. Update #2349
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/src/kern_tc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index 92739d8edd..78d7fa1e3f 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -2138,9 +2138,11 @@ pps_capture(struct pps_state *pps)
pps->capffth = fftimehands;
#endif
pps->capcount = th->th_counter->tc_get_timecount(th->th_counter);
+#if defined(RTEMS_SMP)
atomic_thread_fence_acq();
if (pps->capgen != th->th_generation)
pps->capgen = 0;
+#endif
}
void
@@ -2165,7 +2167,11 @@ pps_event(struct pps_state *pps, int event)
if ((event & pps->ppsparam.mode) == 0)
return;
/* If the timecounter was wound up underneath us, bail out. */
+#if defined(RTEMS_SMP)
if (pps->capgen == 0 || pps->capgen !=
+#else
+ if (pps->capgen !=
+#endif
atomic_load_acq_int(&pps->capth->th_generation))
return;