summaryrefslogtreecommitdiff
path: root/ppsthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'ppsthread.h')
-rw-r--r--ppsthread.h20
1 files changed, 8 insertions, 12 deletions
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 */