diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-02-27 14:49:09 -0700 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-07 07:30:44 +0100 |
commit | 069275f5fad0bc633fd0d7d9454601c3aee208ce (patch) | |
tree | 1b971938c9c146494a7ad0e8ee8b723ae43d5337 /cpukit/score | |
parent | ntptime: ansify (diff) | |
download | rtems-069275f5fad0bc633fd0d7d9454601c3aee208ce.tar.bz2 |
pps: Load timecounter once in pps_capture()
This ensures that the timecounter and the tc_get_timecount handler belong
together.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/604
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/src/kern_tc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 92da675172..eca1a80f33 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -2141,6 +2141,7 @@ void pps_capture(struct pps_state *pps) { struct timehands *th; + struct timecounter *tc; KASSERT(pps != NULL, ("NULL pps pointer in pps_capture")); th = timehands; @@ -2149,7 +2150,8 @@ pps_capture(struct pps_state *pps) #ifdef FFCLOCK pps->capffth = fftimehands; #endif - pps->capcount = th->th_counter->tc_get_timecount(th->th_counter); + tc = th->th_counter; + pps->capcount = tc->tc_get_timecount(tc); #if defined(RTEMS_SMP) atomic_thread_fence_acq(); if (pps->capgen != th->th_generation) |