[PATCH v2 10/12] timepps.h: PPS_SYNC defined by default

Gabriel Moyano gabriel.moyano at dlr.de
Fri Apr 29 07:20:49 UTC 2022


---
 cpukit/include/sys/timepps.h    |  1 +
 cpukit/score/src/kern_ntptime.c | 10 ----------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/cpukit/include/sys/timepps.h b/cpukit/include/sys/timepps.h
index 0d666a4f2e..b13ac6bf26 100644
--- a/cpukit/include/sys/timepps.h
+++ b/cpukit/include/sys/timepps.h
@@ -27,6 +27,7 @@
 #ifdef __rtems__
 #include <rtems/score/atomic.h>
 #include <rtems/rtems/types.h>
+#define PPS_SYNC
 #endif /* __rtems__ */
 
 #define PPS_API_VERS_1	1
diff --git a/cpukit/score/src/kern_ntptime.c b/cpukit/score/src/kern_ntptime.c
index c1b4013e9b..8a16702736 100644
--- a/cpukit/score/src/kern_ntptime.c
+++ b/cpukit/score/src/kern_ntptime.c
@@ -538,16 +538,6 @@ kern_ntp_adjtime(struct thread *td, struct timex *ntv, int *retvalp)
 	ntv->jitcnt = pps_jitcnt;
 	ntv->stbcnt = pps_stbcnt;
 #endif /* PPS_SYNC */
-#ifdef __rtems__
-	ntv->ppsfreq = 0;
-	ntv->jitter = 0;
-	ntv->shift = 0;
-	ntv->stabil = 0;
-	ntv->jitcnt = 0;
-	ntv->calcnt = 0;
-	ntv->errcnt = 0;
-	ntv->stbcnt = 0;
-#endif /* __rtems__ */
 	retval = ntp_is_time_error(time_status) ? TIME_ERROR : time_state;
 	NTP_UNLOCK();
 
-- 
2.25.1



More information about the devel mailing list