[LinuxPPS] multiple access to /dev/ppsN entries

George Spelvin linux at horizon.com
Fri Mar 19 12:33:33 CET 2010


> Good news!
> Correct me please if I'am wrong: This blocking will be left when a new result 
> is there _and_ the using application is schedulded the next time (means 
> usually something below a millisecond later).

I don't quite understand.  The application is unblocked as part of the
interrupt handler.  Of course, there is a delay between "scheduled to
run" and "running".  Is that what you're referrinf to?

The question is really what you mean by "blocked".  If the processor
was idle when the process became ready to run, it will be scheduled
as part of the interrupt return a few microseconds later.

>> The onle big *mistake* in my patch set was that I made *all* the
>> parameters per-fd, but while nothing in the PPSAPI spec requires all
>> users to have the same event set (and letting different readers use
>> different ines is quite useful), a careful reading shows that it expects
>> the offset values to be global.

> Sorry I don't understand  these details exactly, Perhaps Miroslav stumbled 
> across this? (But it is quite sure not your patch causing his problem.)
> " ...
> 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.
> ..."

That's something the current implementation does (the event mode is
global), and I fixed because I thought it was stupid.

> George can you do me (and others) a big favour please and post the patches to 
> LKML and / or LinuxPPS?

Do you want the patches with the per-open offset?  Those are ready;
making the offset global got stalled and I have to pick it up again.

> Does all events have a slope information? (IIR /dev/lpt interrupts only at one 
> slope)

According to the API, yes.  A given hardware device might not provide
both types of events, but all events are of one type or the other.



More information about the LinuxPPS mailing list