summaryrefslogtreecommitdiff
path: root/ntpshm.c
Commit message (Collapse)AuthorAgeFilesLines
* Shut up, splint! All regressiion tests pass.Eric S. Raymond2015-02-151-3/+3
|
* Remove unused and incorrect retval from timespec_strZbigniew Chyla2015-02-151-4/+4
| | | | | | | All callers ignore value returned by timespec_str. Additionally, the function returns simply the result of snprintf(), which is not necessarily the number of chars written to the buffer (if the buffer provided by the caller was too small).
* Simplify NTP SHM segment creation.Eric S. Raymond2015-02-151-5/+6
| | | | | | This will avoid an object file compatibility break later. All regression tetrs pass. SHM segments allocate successfully in live testing.
* Replace Gary's magic number 22 with TIMESPEC_LEN.Eric S. Raymond2015-02-121-4/+4
| | | | All regression tests pass.
* Convert ntpshm.c to use timespec_str()Gary E. Miller2015-02-051-12/+13
|
* Comment possible numeric overflow in timespec_diff_ns()Gary E. Miller2015-02-021-0/+1
| | | | | timespec_diff_ns() should not be used is the delta is more than about 2 seconds.
* Fix PPS comment.Gary E. Miller2015-01-291-3/+3
|
* Complete splint cleanup.Eric S. Raymond2015-01-211-0/+6
|
* More splint cleanup. All regression tests pass.Eric S. Raymond2015-01-211-3/+8
|
* Easy splint cleanups. All regression tests pass.Eric S. Raymond2015-01-211-1/+1
|
* Refactor the way NTP shared memory segments are addressed.Eric S. Raymond2015-01-131-23/+30
| | | | | | | | | | This is a first step towards removing the NTPSHMSEGS limit. Instead of devices holding two indices into the segment array in the context structure, give them copies of the actual segment pointers and allow ntpshm_put() to take a pointer limit. All regression tests pass.
* Now that the transition is done we can restore the gpsd_report name.Eric S. Raymond2014-08-271-11/+11
| | | | All regression tests pass.
* The big leap. Most instances of gpsd_report are replaced...Eric S. Raymond2014-08-271-11/+11
| | | | | | | | | | | | | | | | ...with calls to gps_notify(), which indirects to its output method through a slot in an errout structure. Usually the errout structure lives inside the session context, but because struct errout_t is its own thing this does not have to be the case. One large clique of gpsd_notify() calls, in packet.c and isgps.c, looks at a struct errout_t copy in a lexer control block This change is not complete. Remnant gpsd_report calls need to be changed, and gpsmon needs to be tweaked so that the struct_error_t in its context is a non-defaukt hook updating the cuses display rather than simply dumping to stderr. Also the report label functionality needs to be added. All regression tests pass.
* Introduce struct errout_t to encapsulate error-reporting hooks.Eric S. Raymond2014-08-271-11/+11
| | | | | | A major step towards eliminating reverse linkage. All regression tests pass.
* ntpshm.c: add comment to note where shmTime comes from.Gary E. Miller2014-01-041-8/+9
|
* Use GPS_PATH_MAX instead of PATH_MAX.Bernd Zeimetz2013-11-291-1/+1
| | | | | ntpshm.c was still using PATH_MAX, resulting in a build failure on architectures like hurd-i386.
* Clean up of ntpshm logging.Gary E. Miller2013-11-261-3/+18
|
* Set time stamp in chrony SOCK sample correctly.Miroslav Lichvar2013-11-221-1/+1
| | | | | | | | The tv field should be the local time when was the sample received, not the reference time. Otherwise the sample could be ignored as coming from future. Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* uBlox -> u-blox; the company does not biicapitalize its name.Eric S. Raymond2013-11-091-1/+1
|
* Code is fully cppcheck, splint, and Coverity clean.Eric S. Raymond2013-11-061-0/+1
| | | | All regression tests pass. PPS is live.
* Partial cppcheck and Coverity cleanup.Eric S. Raymond2013-11-061-1/+3
| | | | | | Coverity found a potential overrun bug. All regression tests pass. PPS is live.
* Unify time-difference computations. All regression tests pass, PPS is live.Eric S. Raymond2013-11-061-2/+1
|
* splint cleanup.Eric S. Raymond2013-11-061-1/+3
|
* Clarifying name change. All regression test pass. PPS is live.Eric S. Raymond2013-11-061-3/+3
|
* Update for the existence of the barrier() function.Eric S. Raymond2013-11-061-2/+5
|
* Sets precision inside ntpshm_put().Michael Tatarinov2013-11-061-3/+10
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Simplify the PPS hook.Michael Tatarinov2013-11-061-6/+5
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* ntpshm_pps() is gone.Michael Tatarinov2013-11-061-107/+23
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* C variables are case insensitive, but still nice to have matching case.Gary E. Miller2013-11-051-13/+13
| | | | | Should be no functional change. Thanks to: Michael Tatarinov <kukabu@gmail.com>
* Get some ntpshm coments to align with new realityGary E. Miller2013-11-051-3/+1
|
* Use the new timedrift_t to simplify PPS.Gary E. Miller2013-11-051-26/+18
|
* Fix a PPS debug report nit.Gary E. Miller2013-11-051-1/+1
|
* Partial splint cleanup. All regression tests pass. PPS is live.Eric S. Raymond2013-11-051-1/+7
|
* Be a little more paranoid about shmTime.Gary E. Miller2013-11-051-2/+2
| | | | Fix per Harlan Stenn <stenn@ntp.org>
* Fix typo. Thanks to Mick Durkin <mick.durkin@napierdeltic.demon.co.uk>Gary E. Miller2013-11-051-1/+1
|
* Insert memory barriers where requested, since we actually have them.Eric S. Raymond2013-11-051-4/+8
|
* Fix a rounding problem in last patch.Gary E. Miller2013-11-051-9/+7
| | | | ntpshm uses the same sec for usec and nsec, so do not round.
* Add new ntpd nSec fields to SHM interfaceGary E. Miller2013-11-051-1/+7
|
* Use timedrift_t for all hook arguments.Eric S. Raymond2013-11-031-26/+28
| | | | | | | | | No logic changes in this commit. We push naosecond precision closer to where time hints are shipped. Changes to ppsthread.c are kept minimal; it needs a cleanup but that will be done in another change that can be separately reviewed. All regression tests pass. PPS is live in gpsmon and reported by gpsd.
* Eliminate an enable flag that always gets set true.Eric S. Raymond2013-11-021-4/+2
| | | | All regression tests pass. PPS is live.
* Namespace cleanup. All regression tests pass, PPS is live.Eric S. Raymond2013-11-021-2/+2
|
* Finish decoupling the PPS watcher code from NTP shared-segment management.Eric S. Raymond2013-11-021-2/+13
| | | | Also, further contain the latter.
* Eliminate the race in KPPS thread startup.Eric S. Raymond2013-10-311-7/+1
| | | | | | | | | The previous change (ntpd_link_activate() moving to after device-open time) made it possible to lift the attempts at KPPS initialization out of the PPS-watcher thread, because it no longer has to await the device open. This also greatly simplifies the generic thread-watcher interface. All regression tests pass, PPS is live.
* PPS on a pty doesn't work.Eric S. Raymond2013-10-311-1/+1
| | | | | | | | | This had been breaking the regression tests for a while (since "Unconditionally enable PPS at startup." to be exact) but I didn't realize it because an unrelated bug in the build system was usually turning PPS off for me. Live tests were unaffected. All regression tests pass with pps either on or off. Live PPS works.
* Revert "Separate ntpd support from chrony support, step 1."Eric S. Raymond2013-10-301-0/+505
| | | | We'll have to sneak up on this change more slowly.
* Separate ntpd support from chrony support, step 1.Eric S. Raymond2013-10-301-505/+0
| | | | | | | | | | | | | ntp_offset becomes time_offset. There is a new config symbol CHRONY_ENABLE; most time service code is npw controlled by TIMESERVICE_ENABLE. The file ntpshm.c becomes timeexport.c This change is not complete. More disentanglement has to be done inside timeexport.c itself; at the moment enabling one but not both of ntpshm or chrony will probably break its compile. The point of getting this commit out is so Gary will see the new baseline code ASAP. All regression tests pass.
* Re-enable compilation with ntpshm=no.Eric S. Raymond2013-10-301-0/+3
|
* splint cleanup. Regression tests pass and PPS live-tests correctly.Eric S. Raymond2013-10-291-5/+11
|
* Separate policy from mechanism.Eric S. Raymond2013-10-291-10/+24
|
* ntpshm.c splits up; thread management now lives in ppsthread.cEric S. Raymond2013-10-291-677/+6
|