[LinuxPPS] PPS next steps...

George Spelvin linux at horizon.com
Fri Feb 6 15:47:52 CET 2009


Rodolfo Giometti <giometti at enneenne.com> wrote:

> On Fri, Feb 06, 2009 at 09:22:31AM -0500, George Spelvin wrote:
>> I need to test things like the poll function and fasync.
>> The patches I posted run ntpd just fine (x86_64, at least), but
>> that doesn't test the more obscure stuff.
>
> The fasync part should be discussed well...

As I noted in the comments, that's a pretty massive kludge.
I'm not quite sure what the semantics should be.

>> Given a working poll function, it would be nice to change the kernel
>> API to handle the timeout in user space using poll() or select() and
>> simplfy the kernel fetch IOCTL.
>
> I agree but keep in mind RFC's PPS API, I think is totally useless
> doing something Linux specific only.

Yes, of course.  I don't propose changing that, just implementing it as
two system calls, a poll() to manage the timeout plus a read of some sort.

>> I'm also thinking about a text form to be delivered when
>> reading from the file.  the main problem is that the format in
>> /sys/class/pps/pps%d/{assert,clear} provides no way to distinguish assert
>> from clear edges.  Maybe a leading sign on the sequence number?
>
> Yes.

>> Or just a Plan 9 style whitespace-separated line.
>> assert <seq> <time>.<frac>
>> clear <seq> <time>.<frac>
>
> No. you cannot put spaces into sysfs files.

I'm sorry that I was unclear.  This is not a sysfs file, but rather the
(proposed) output of "cat /dev/pps0".  The obvious thing to do is make
it the same as the sysfs files, but that's not essential.

It's already going to be different in that it outputs multiple lines,
as long as it's kept open.



More information about the LinuxPPS mailing list