diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-20 16:22:35 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-20 17:34:28 -0400 |
commit | 027daf772077b3a6e46022df8fca9c2d1bcb1f89 (patch) | |
tree | 0f3d531aadc49c751c42a1408f997d7e4165cdba /ppsthread.h | |
parent | ee86ca3e7503f5164bd02810ac40b46fc72eb601 (diff) | |
download | gpsd-027daf772077b3a6e46022df8fca9c2d1bcb1f89.tar.gz |
Doc & interface cleanup of ppsthread code. PPS observed live.
Diffstat (limited to 'ppsthread.h')
-rw-r--r-- | ppsthread.h | 18 |
1 files changed, 10 insertions, 8 deletions
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 |