[LinuxPPS] PPS next steps...

George Spelvin linux at horizon.com
Fri Feb 6 23:53:26 CET 2009


>> Let me turn it around... what do you think "cat /dev/pps0" should do?
>
> It, eventually, should return pps0 raw data as byte stream.

Great!  Would you care to propose the byte stream so I can implement it?
What is the word size and byte order?  Is there any kind of inter-event
marker, or does the reader just have to count bytes?

>> Currently it returns -EINVAL.
>
> Which not break read(2) semantic at all. :)

Well, given that I currently have poll(2) indicating that the fd is
readable, I thought it would be nice if it were...

>> I'd like it to print something that cound be fed into perl or gnuplot.
>
> f you wish doing something like this, you can do a userland filter
> which interprets PPS data and print out them into human readable form,
> but you cannot ask the kernel to it for you since doing like this you
> are implementing policies and not mechanism as old UNIX school
> teach. :)

Huh?  I understand the distinction, but the details of a data format
are not policy; what data is available is policy.

For example, by changing the API so that timestamp fetching depends on
read access and global parameter setting depends on write access, that
provides a mechanism which allows the policy decision of who's allowed to
use the PPS system ot be made in user space using familiar file permission
settings.

The format can be translated.  I just think that read(2) is a more
convenient (although less portable) mechanism than the PPS API.
The intent is for it to be equivalent.



More information about the LinuxPPS mailing list