[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [Greg Troxel] [PATCH] Add NetBSD support for RFC2783 PPS.

From: Greg Troxel
Subject: Re: [gpsd-dev] [Greg Troxel] [PATCH] Add NetBSD support for RFC2783 PPS.
Date: Mon, 25 Nov 2013 08:56:27 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix)

So I probably over-reacted with 'not baked'.  Everything I sent is safe,
and I'm pretty sure it's basically all correct.  It just doesn't go far
enough.  And indeed, I was very conscious of not breaking working code
on Linux.  Longer term, I'd like to see more code migrated to the "code
written by reading standards" branch, vs the "debugged until it worked
on some version of Linux" branch.  But that's scarier and not for now.

What I see doing next (not necessarily for 3.11):

 * understanding the logic better and adding comments.  In particular
   while the actual TIOCMIWAIT code is ifdefed out, I'm not convinced
   that the logic doesn't expect it to have run.  (It's not clear that
   this code has ever run successfully on a system without TIOCMIWAIT.)

 * Add support for systems without PPS_CANWAIT, by basically having a
   loop that sleeps 100ms and calls fetch, until something changes.
   This feels hacky, but it's obvious and easy.  There may be a tight
   CPU loop on such systems, so perhaps at least a form of this should
   go in.

 * Reexamine the edge-detection code, which seems to run every time.

 * Understand why there is a notion of associating the timecode with an
   edge in this code.  I get it why code that receives a timecode has to
   have some notion of early/late, but I don't see why PPS has this
   notion at all.  (I realize my efforts here may just be more
   untangling that isn't yet done, which is fine.)

Questions for people out there:

 * Does FreeBSD support PPS_CANWAIT?  Does Linux (it must, from the

 * Does OpenBSD support RFC2783 or TIOCMIWAIT?  Does the gpsd PPS code work
   on OpenBSD?

 * Does any of this work on other systems?  Solaris?  Is anyone aware of
   systems were ntpd has PPS and gpsd doesn't?

Attachment: pgpkvzcwHQ4TB.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]