Subject: re: PPS code
To: David Seifert <seifert@sequent.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 04/22/1998 14:58:41
>> TIODCDTIMESTAMP
>
>How about TIO_DCD_TIMESTAMP ?

TIOCDCDTIMESTAMP is what the existing xntpd codebase uses, so i think
we should stick with that.  This is for backward compatiblity, after
all.


> TIOCFETCHTSTMP

>How about TIOC_FETCH_TIMESTAMP ?  (or _GET_)
>
>Spelling out words and adding a few underscores makes
>things MUCH easier to read.

The latest patch has  
    TIOCGTSTAMP	 -- get state of PPS phase-error (timesetamp) sampling 
    TIOCSTSTAMP	 -- set state of PPS phase-error (timesetamp) sampling 
    TIOCSTAMP	 -- fetch most recent PPS timestamp 

which is after good suggestions from Chris Torek and Jason Thorpe.  I
don't see any underscores in sys/sys/ttycom.h.

But if there's a  consensus to add them, I will.

Personally, I think changing the names to 

   TIOCGPPSPHASE     -- get PPS state
   TIOCSPPSPHASE     -- set PPS state
   TIOCPPSPHASE	     -- fetch most recent PPS phase-error

would be just as clear, and would reinforce that these ioctls really
affect PPS phase-error sampling.  They aren't just timestamps per se
and they do have the side-effect of enabling hardpps() if it's configured.

But I don't want to restrict the ioctl() interface unduly.