[rtems commit] pps: Directly assign the timestamps in pps_event()
Sebastian Huber
sebh at rtems.org
Thu Mar 9 06:54:14 UTC 2023
Module: rtems
Branch: master
Commit: 3cda5ad95383e6fc7dee97ffe4b8828d90ea05ca
Changeset: http://git.rtems.org/rtems/commit/?id=3cda5ad95383e6fc7dee97ffe4b8828d90ea05ca
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Feb 27 14:49:09 2023 -0700
pps: Directly assign the timestamps in pps_event()
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/604
---
cpukit/score/src/kern_tc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index 586331dc7a..5e43964bf4 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -2244,8 +2244,7 @@ pps_event(struct pps_state *pps, int event)
tcount = pps->capcount - tcount;
tcount &= captc->tc_counter_mask;
bintime_addx(&bt, capth_scale * tcount);
- bintime2timespec(&bt, &ts);
- *tsp = ts;
+ bintime2timespec(&bt, tsp);
if (foff) {
timespecadd(tsp, osp, tsp);
@@ -2260,9 +2259,8 @@ pps_event(struct pps_state *pps, int event)
bt = pps->capffth->tick_time;
ffclock_convert_delta(tcount, pps->capffth->cest.period, &bt);
bintime_add(&bt, &pps->capffth->tick_time);
- bintime2timespec(&bt, &ts);
(*pseq_ffc)++;
- *tsp_ffc = ts;
+ bintime2timespec(&bt, tsp_ffc);
#endif
#ifdef PPS_SYNC
More information about the vc
mailing list