summaryrefslogtreecommitdiff
path: root/ppsthread.c
Commit message (Collapse)AuthorAgeFilesLines
* More trailing whitespace fixups.Gary E. Miller2015-04-301-9/+9
|
* Tweak a log message, to separate call and return vars.Gary E. Miller2015-04-011-2/+2
|
* Move the calculation back into "Stage Three: Calculation"Gary E. Miller2015-04-011-1/+7
| | | | This cancels the change that broke a lot of logging.
* Eliminate some duplication code for timespec arithmetic.Eric S. Raymond2015-04-011-47/+1
|
* Stop making the assumption that device cycle time is 1 second in ppsthread.c.Eric S. Raymond2015-04-011-9/+3
| | | | | | | | 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.
* Increase consistency of names. No code changes.Eric S. Raymond2015-04-011-1/+1
|
* Further thread-monitor interface simplification.Eric S. Raymond2015-04-011-2/+0
| | | | | | 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.
* Clean up PPS monitor interface with renames, and additional documentation.Eric S. Raymond2015-04-011-7/+7
|
* Thread monitor interface simplification.Eric S. Raymond2015-04-011-5/+1
| | | | | | With a bit of refactoring we can eliminate one of the hooks. PPS observed live, telnetting to localhost:2947 with gpsd running.
* pps_canwait needs to be visible in TIOCCMIWAIT case.Eric S. Raymond2015-03-311-1/+1
|
* Comment polishing.Eric S. Raymond2015-03-311-5/+7
|
* In ppsthread.c, two structure memberrs can be hidden a bit more.Eric S. Raymond2015-03-311-1/+1
|
* remove some duplicate code by using new innner_context_tGary E. Miller2015-03-311-50/+25
| | | | pps_canwait and pps_caps now persistent.
* KPPS now reads /dev/ppsX, but is missing last_fixtime.Gary E. Miller2015-03-311-11/+24
| | | | | Also some commment on why ppsthread uses a 10% detection window on what would seemingly be a 1e-3 or 1e-9 quantity.
* Information hiding. Move kernelpps_handle out of thread-context structure...Eric S. Raymond2015-03-311-109/+87
| | | | | | ...stash it in an inner context. PPS observed live on GR601-W.
* Separate invisible pulse detection from unchanged detection.Gary E. Miller2015-03-311-8/+11
| | | | | The old code broke invisible pulse on 5Hz and 0.5 Hz PPS. Also did not catch many of the chattering modes.
* ppsthread.[ch] and timespec_str.c are now fully detached from the rest of GPSD.Eric S. Raymond2015-03-311-2/+6
| | | | | | This means they could be dropped into NTP or another time-service program. The only requirement is to set -DHAVE_SYS_TIMEPPS_H if you want the RFC2783 code compiled in.
* Loosen ppsthread.c's ties to the rest of GPSD.Eric S. Raymond2015-03-311-8/+14
| | | | | | | | | Soon, being able to drop it into NTP may be valuable. The only remaining adhesion is that it needs gpsd_config.h for the status of HAVE_SYS_TIMEPPS_H. No code changes.
* Add a lot of comments about PPS logic, Clean up an indent.Gary E. Miller2015-03-301-120/+210
|
* Stupid typo in KPPS logic. TPPS was running when KPPS was good.Gary E. Miller2015-03-301-1/+2
|
* Fix segfault from botched log message.Gary E. Miller2015-03-301-2/+2
|
* Be consistent about not says uSec.Gary E. Miller2015-03-301-1/+1
|
* clang found a real bug, don't mask the bug.Gary E. Miller2015-03-301-2/+0
|
* Remove stray ok = false;Gary E. Miller2015-03-301-2/+0
|
* Write scan-build suppressions to it runs clean.Eric S. Raymond2015-03-301-38/+11
| | | | | | Promote scan-build to be onere of the stock pre-release checks. Fix one minor cppcheck nit.
* One line fix to PPS w/o KPPS not working.Gary E. Miller2015-03-301-46/+59
| | | | Plus a ton of logging tweaks
* Plain english edge description.Gary E. Miller2015-03-301-8/+12
|
* Typo, THREAD_INF not THREAD_INFOGary E. Miller2015-03-301-1/+2
|
* Stringer warning when KPPS not available.Gary E. Miller2015-03-301-3/+10
|
* Don't throw the baby out with the bathwater.Gary E. Miller2015-03-301-225/+354
| | | | 'reverting' 4336209683d0f5927e32a4edf9131a17e1618253
* Remove dead code found by scan-build in ppsthread.c.Eric S. Raymond2015-03-301-2/+0
| | | | PPS observed live on GR601-W.
* Make TIOCMIWAIT PPS work again.Eric S. Raymond2015-03-301-353/+226
| | | | | | | | | Reverts most of 'Pull out RFC2783 edge finding into a new function: get_edge_rfc2783()', but keeps the removal of a lot of splint markup for cleaner alternatives. This version passes regressions, splints clean, and exhibits PPS on the GR601-W when running as either root or non-root.
* Fix a truncated PPS log message.Gary E. Miller2015-03-291-1/+2
|
* Do not try to use time_pps_getcap() if no pps_handle.Gary E. Miller2015-03-291-1/+5
|
* Beat the splint beast into submission.Eric S. Raymond2015-03-291-12/+17
| | | | | | Code splints clean, all regression tests pass, but 1PPS is not being detected and wasn't before this changeset. Debug messages suggest the trailing edge is being rejected.
* Last splint thing in ppsthread.cGary E. Miller2015-03-281-1/+1
|
* ppsthread.c is splint clean, but one thing. YMMV.Gary E. Miller2015-03-281-30/+49
|
* work around incorrect definition of struct timespec in splint 3.12Eric S. Raymond2015-03-281-0/+6
|
* Remove the last of no longer needed splint cruft from ppsthread.cGary E. Miller2015-03-251-34/+2
| | | | scons splint runs fine, no code changes
* Remove unneeded splint overridesGary E. Miller2015-03-251-13/+0
| | | | splint still happy
* Brain damaged pps-gpio sometimes never fills in PPS clear timestamp.Gary E. Miller2015-03-251-1/+9
|
* add yet a tad more PPS trace logging.Gary E. Miller2015-03-251-0/+9
|
* Remove unneeded -#ifndef S_SPLINT_SGary E. Miller2015-03-251-9/+8
| | | | Cruft be gone!
* Splint fixes.Gary E. Miller2015-03-251-10/+4
|
* Fix another nit that bothers splint.Gary E. Miller2015-03-251-1/+1
|
* Make cppcheck happy, reduce scope of pther_errGary E. Miller2015-03-251-1/+2
|
* gpsd no longer needs TIOCMIWAIT if it has RFC2783 PPS_CANWAITGary E. Miller2015-03-251-10/+45
| | | | Next step is to ensure gpsd can compile and run without TIOCMIWAIT
* Pull out RFC2783 edge finding into a new function: get_edge_rfc2783()Gary E. Miller2015-03-251-194/+269
| | | | Still depends on TIOCMIWAIT, but not for much longer.
* Clean up a binary and.Gary E. Miller2015-03-241-1/+1
|
* ppsthread.c broken on non-LinuxHal Murray2015-03-241-1/+1
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>