[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: Gary E. Miller
Subject: Re: [gpsd-dev] [Greg Troxel] [PATCH] Add NetBSD support for RFC2783 PPS.
Date: Mon, 25 Nov 2013 10:33:23 -0800

Yo Greg!

On Mon, 25 Nov 2013 08:56:27 -0500
Greg Troxel <address@hidden> wrote:

>  * 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

Correct.  Whoever added the ifdef's for TIOCMIWAIT did not put them
in the right place.  Since the code never worked without TIOCMIWAIT
I just let it go.  If you are going to get it workong on just KPPS
then the edge detect logic, which now need TIOCMIWAIT needs to work
on either edge source.

>  * 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.

A quick wakeup and peek every 100mSec should be fine.  The edge is
captured by the kernel so still good.

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

See above.  And if no edge, then just go back to sleep.

>  * 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.)

The whole point of the code is to find the right edge!  Without the
edge we do not know the time.

> Questions for people out there:
>  * Does FreeBSD support PPS_CANWAIT?  Does Linux (it must, from the
>    code)?

Linux supports PPS_CANWAIT, but gpsd has never used it.  No need to.

>  * 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?


Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature

reply via email to

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