[DragonFlyBSD - Bug #3368] (New) [PATCH] kern_clock: clean up whitespace; implement timeouts for `PPS_CANWAIT`

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Sat May 11 05:51:43 PDT 2024


Issue #3368 has been reported by dancrossnyc.

----------------------------------------
Bug #3368: [PATCH] kern_clock: clean up whitespace; implement timeouts for `PPS_CANWAIT`
http://bugs.dragonflybsd.org/issues/3368

* Author: dancrossnyc
* Status: New
* Priority: Normal
* Category: Kernel
* Target version: 6.6
* Start date: 2024-05-11
----------------------------------------
In the course of setting up a GPS-disciplined stratum 1 NTP server using gpsd and chrony, I found that `gpsd` wasn't able to track the PPS signal I'd wired into the DCD line of a UART. Investigating, I found that this was due to not supporting the `PPS_CANWAIT` functionality specified in RFC 2783; attempts to block until a PPS event fired would return `EOPNOTSUPP`. The corresponding functionality was in FreeBSD, and is very straight-forward: treat the event sequencers as atomic counters and loop over waiting for them to change, with a `tsleep` in the body of the loop and corresponding `wakeup` in the event handler. With this change, `gpsd` now sees PPS events and feeds PPS-corrected timestamps to chrony. Note that I didn't gate this on `PPS_SYNC`, though perhaps I should? I'm happy to revisit and make adjustments if there's consensus there.

These two patches capture the change, and also cleanup some trivial whitespace bogons (blanks at the ends of lines); the commits are separated in the spirit of keeping random cleanup separate from functionality changes.

---Files--------------------------------
0002-pps_fetch-introduce-a-helper-to-handle-timeouts.patch (2.85 KB)
0001-trivial-Clean-up-white-space-at-ends-of-lines.patch (5.5 KB)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list