[LinuxPPS] multiple access to /dev/ppsN entries

Miroslav Lichvar mlichvar at redhat.com
Wed Mar 17 20:16:52 CET 2010


On Wed, Mar 17, 2010 at 12:15:59PM -0600, clemens at dwf.com wrote:
> > Unless they set the PPS parameters differently, the first started
> > application could be receiving something else than it's expecting.
> > 
> How so?
> Seems that they should both be reading the same register.

I tried opening the same PPS device twice, one for assert events and
one for clear events, and only the later worked, so I'm assuming the
setting is per device instead of per open. If both capture same
events, it works fine.

On Wed, Mar 17, 2010 at 07:21:09PM +0100, Bernhard Schiffner wrote:
> because I'am a little bit out of business here: does cat /dev/pps* return 
> nowadays something usefull?
> IIR it is intended as a container for functioncalls (RCF2783) and does provide 
> -EINVAL to a normal read(2).

# cat /dev/pps0
cat: /dev/pps0: Invalid argument

> I used a patch from George Spelvin and was _very_ happy to have a (multi) 
> readable  /dev/pps*.
> 
> It starts with 
> http://ml.enneenne.com/pipermail/linuxpps/2009-February/002831.html
> 
> and George sent me (later, PM) his patch-queue against 2.6.32-rc6. If there is 
> interest in, I'll ask him to post this to the list.

Not sure if this is good enough for your need, but it's possible to
read the timestamps also directly from /sys/class/pps/pps0/{assert,clear}.

-- 
Miroslav Lichvar



More information about the LinuxPPS mailing list