summaryrefslogtreecommitdiff
path: root/timehint.c
Commit message (Collapse)AuthorAgeFilesLines
* Trailing whitespace fixup.Gary E. Miller2015-04-301-15/+15
|
* Move ntpshm_put() logging to PROG from RAW.Gary E. Miller2015-04-011-1/+1
| | | | Only once a second.
* Prefix all NTP logs with NTP:Gary E. Miller2015-04-011-6/+6
| | | | This makes it easy to pick oout the time logs. Along with PPS:
* Whoops, a pointer, not a pointer to a pointer.Gary E. Miller2015-04-011-6/+13
| | | | /dev/pps0 actually seems to work.
* Remove validations on /dev/pps0 time that can never work.Gary E. Miller2015-04-011-14/+20
| | | | | | /dev/pps0 now ships time to NTP SHM. Very wrong time... last_fixtime is all wacky...
* Do not double increment the last_fixtime.Gary E. Miller2015-04-011-13/+3
|
* non PPS typo in timehint.c (off by one on the } )Hal Murray2015-04-011-1/+1
|
* Eliminate some duplication code for timespec arithmetic.Eric S. Raymond2015-04-011-1/+1
|
* Stop making the assumption that device cycle time is 1 second in ppsthread.c.Eric S. Raymond2015-04-011-3/+13
| | | | | | | | Instead, pass out real time of last PPS as it was actually seen. We can then correct it using the device's actual cycle time. The correction currently only works for cycle times that are integral multiples of a second.
* Further thread-monitor interface simplification.Eric S. Raymond2015-04-011-8/+2
| | | | | | Remove the wrap hook. The only thing it was doing was closing the chrony fd. which can be done just as cleanly by whatever calls the pps_thread_deactivate() function.
* Thread monitor interface simplification.Eric S. Raymond2015-04-011-0/+4
| | | | | | With a bit of refactoring we can eliminate one of the hooks. PPS observed live, telnetting to localhost:2947 with gpsd running.
* Another small step to /dev/ppsX. ppsthread now looping fine, no time yet.Gary E. Miller2015-03-311-8/+15
|
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-33/+3
| | | | | | | | | | | | | | | | | | | The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
* More offerings to the splint god.Gary E. Miller2015-03-281-1/+9
|
* Remove unnedded splint over ride.Gary E. Miller2015-03-251-1/+1
|
* Add root device name to PPS debug output.Gary E. Miller2015-03-191-3/+6
| | | | | | | | With more than one PPS thread going at a time hard to know which is which without help. Also remove restriction that devicename is a tty since /dev/ppsX is not a tty.
* splint/cppcheck/coverity prerelease cleanup.Eric S. Raymond2015-03-131-1/+1
|
* Comment fix.Eric S. Raymond2015-03-111-1/+1
|
* Add a lst minute check in chrony send to validate leap notify.Gary E. Miller2015-03-101-2/+15
| | | | | | | | Same fix as in ntpshmwrite.c. GPS may notify about upcoming leap second long before NTP can handle it. So limit leap notify to months of June and December. Per Hall Murray and http://bugs.ntp.org/1090
* chronfd doesn't belong in the thread context, move it back out to session.Eric S. Raymond2015-03-081-8/+8
|
* Break timespec_str out of gpsutils.c.Eric S. Raymond2015-03-081-0/+1
| | | | | | It's not used on the client side, and it's needed separately for ntplib. All regression tesrs pass. PPS is live.
* Decouple (mostly) the PPS thread-monitor from the session structure.Eric S. Raymond2015-03-081-4/+6
| | | | | | | | | | | | This is the big step towards ntplib. A couple of minor issues remain to be ironed out, the most significant of which is what to do about the timestamp_t type. This changes some field offsets of private fields in struct gps_device_t. Probably does not require a version bump as access to them is all through the libgpsd API. All regression tests pass. PPS observed live in gpsmon direct mode.
* gpsd-report() -> gpsd_log()Eric S. Raymond2015-03-071-29/+29
| | | | | | | | | | | | | | | | This change is done so we can add a "log" hook to the pps_thread_t structure (this is not done yet) and harmonize with the name of the outer logging function. If that name had been left as gpsd_report() there would have been scope for bad confusion with the report_hook member. Also, remove two stray duplicative printf calls from the NMEA2000 driver (drivers shouldn't have printfs!) and fix one typo. This is a step towards factoring out ntplib. For that to happen, the PPS thread code needs to be decoupled from the core session structure. No logic changes. Object compatibility preserved. All regression tests pass.
* Factor PPS-related members of struct gps_device_t into a pps_thread_t structure.Eric S. Raymond2015-03-071-10/+10
| | | | | | | | | | | No logic changes, though it looks like there are two because two guards that would always have failed when the code was compiled with pps=off are now conditioned out. Also, this code is offset-preserving so as not to break link-time compatibility of libgpsd. (This is the subtler approach...) All regression tests pass.
* Begin factoring out ntplib.Eric S. Raymond2015-03-071-0/+440
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.