From 2eed866084e4553473f63951d89de4490ce0169c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 7 Mar 2015 06:50:49 -0500 Subject: Revert "ntplib extraction requires libgpsd object format bump to 23." We need to sneak up on this in a more subtle way. --- ppsthread.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'ppsthread.h') diff --git a/ppsthread.h b/ppsthread.h index 719239aa..ae7bd886 100644 --- a/ppsthread.h +++ b/ppsthread.h @@ -22,21 +22,25 @@ struct timedelta_t { #define HAVE_TIMEDELTA #endif /* HAVE_TIMEDELTA */ -struct pps_thread_t { - timestamp_t fixin_real; - struct timespec fixin_clock; /* system clock time when last fix received */ - struct timedelta_t ppsout_last; - int ppsout_count; +struct pps_state_t { + volatile struct timedelta_t ppslast; + volatile int ppscount; +}; + +struct pps_fixtime_t { + timestamp_t real; + /* clock must be a timespec as it is in nSec and + * a timestamp_t will lose precision */ + struct timespec clock; /* system clock time when last fix received */ }; #define PPS_THREAD_OK 0 #define PPS_LOCK_ERR -1 #define PPS_UNLOCK_ERR -2 -extern int pps_thread_stash_fixtime(volatile struct pps_thread_t *, +extern int pps_thread_stash_fixtime(volatile struct pps_fixtime_t *, timestamp_t, struct timespec); -extern int pps_thread_lastpps(volatile struct pps_thread_t *, - struct timedelta_t *); +extern int pps_thread_lastpps(struct pps_state_t *, struct timedelta_t *); #endif /* PPSTHREAD_H */ -- cgit v1.2.1