diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 00:46:29 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-07 00:49:21 -0500 |
commit | 02c9c43a3aaaf73f84fdf9fbc96e9a32e546d273 (patch) | |
tree | 36a2a1be1db9e495e43f2d3b091bfb97d93dfcc4 /ntpshm.h | |
parent | 8e2682c26186af8fcdc48b4fc8a02685a0ccc6a1 (diff) | |
download | gpsd-02c9c43a3aaaf73f84fdf9fbc96e9a32e546d273.tar.gz |
Begin factoring out ntplib.
All knowledge of the ntpd SHM format is now confined to the three
files ntpshm.h, ntpshmread.c, and ntpshmwrite.c.
No logic changes. All regression tests pass. PPS works on GR-601W.
Diffstat (limited to 'ntpshm.h')
-rw-r--r-- | ntpshm.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -66,10 +66,21 @@ struct shm_stat_t { int leap; }; +#ifndef HAVE_TIMEDELTA + +struct timedelta_t { + struct timespec real; + struct timespec clock; +}; + +#define HAVE_TIMEDELTA +#endif /* HAVE_TIMEDELTA */ + struct shmTime /*@null@*/ *shm_get(int, bool, bool); -extern char *shm_name(const int); -enum segstat_t shm_query(/*@null@*/struct shmTime *, +extern char *ntp_name(const int); +enum segstat_t ntp_read(/*@null@*/struct shmTime *, /*@out@*/struct shm_stat_t *, const bool); +void ntp_write(volatile struct shmTime *, struct timedelta_t *, int, int); /* end */ |