timepps.h: PPS_SYNC defined by default

Update #2349.
This commit is contained in:
Gabriel Moyano
2022-05-20 11:30:01 +02:00
committed by Sebastian Huber
parent b304603b62
commit b3e4f5809d
3 changed files with 2 additions and 11 deletions

View File

@@ -26,6 +26,7 @@
#include <sys/time.h>
#ifdef __rtems__
#include <rtems/score/atomic.h>
#define PPS_SYNC
#endif /* __rtems__ */
#define PPS_API_VERS_1 1

View File

@@ -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();

View File

@@ -81,7 +81,7 @@ T_TEST_CASE( NTP )
T_eq_long( tx.tolerance, 32500000 );
T_eq_long( tx.ppsfreq, 0 );
T_eq_long( tx.jitter, 0 );
T_eq_int( tx.shift, 0 );
T_eq_int( tx.shift, 2 );
T_eq_long( tx.stabil, 0 );
T_eq_long( tx.jitcnt, 0 );
T_eq_long( tx.calcnt, 0 );