From 027daf772077b3a6e46022df8fca9c2d1bcb1f89 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 20 Mar 2015 16:22:35 -0400 Subject: Doc & interface cleanup of ppsthread code. PPS observed live. --- ppsthread.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'ppsthread.h') diff --git a/ppsthread.h b/ppsthread.h index 167a183c..656be6cd 100644 --- a/ppsthread.h +++ b/ppsthread.h @@ -37,20 +37,22 @@ struct timedelta_t { #define timespec_diff_ns(x, y) (long)(((x).tv_sec-(y).tv_sec)*1000000000+(x).tv_nsec-(y).tv_nsec) struct pps_thread_t { - struct timedelta_t fixin; /* real & clock time when in-band fix received */ -#if defined(HAVE_SYS_TIMEPPS_H) - pps_handle_t kernelpps_handle; -#endif /* defined(HAVE_SYS_TIMEPPS_H) */ - int devicefd; /* device file descriptor */ + void *context; + int devicefd; /* device file descriptor */ char *devicename; /*@null@*/ char *(*report_hook)(volatile struct pps_thread_t *, struct timedelta_t *); + /*@null@*/ void (*pps_hook)(volatile struct pps_thread_t *, + struct timedelta_t *); + /*@null@*/ void (*log_hook)(volatile struct pps_thread_t *, + int errlevel, const char *fmt, ...); /*@null@*/ void (*wrap_hook)(volatile struct pps_thread_t *); + struct timedelta_t fixin; /* real & clock time when in-band fix received */ +#if defined(HAVE_SYS_TIMEPPS_H) + pps_handle_t kernelpps_handle; +#endif /* defined(HAVE_SYS_TIMEPPS_H) */ struct timedelta_t ppsout_last; int ppsout_count; - /*@null@*/ void (*pps_hook)(volatile struct pps_thread_t *, struct timedelta_t *); - /*@null@*/ void (*log_hook)(volatile struct pps_thread_t *, int errlevel, const char *fmt, ...); - void *context; }; #define THREAD_ERROR 0 -- cgit v1.2.1