From 61c16bebe1a56cb1c211733b92474bf866eba87d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 7 Mar 2015 05:50:01 -0500 Subject: ntplib extraction requires libgpsd object format bump to 23. The new struct ppsthread_t isolates the interface to the PPS monitor loop. It will need more members before we're done, including some reporting hooks. --- ppsthread.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'ppsthread.h') diff --git a/ppsthread.h b/ppsthread.h index ae7bd886..719239aa 100644 --- a/ppsthread.h +++ b/ppsthread.h @@ -22,25 +22,21 @@ struct timedelta_t { #define HAVE_TIMEDELTA #endif /* HAVE_TIMEDELTA */ -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 */ +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; }; #define PPS_THREAD_OK 0 #define PPS_LOCK_ERR -1 #define PPS_UNLOCK_ERR -2 -extern int pps_thread_stash_fixtime(volatile struct pps_fixtime_t *, +extern int pps_thread_stash_fixtime(volatile struct pps_thread_t *, timestamp_t, struct timespec); -extern int pps_thread_lastpps(struct pps_state_t *, struct timedelta_t *); +extern int pps_thread_lastpps(volatile struct pps_thread_t *, + struct timedelta_t *); #endif /* PPSTHREAD_H */ -- cgit v1.2.1