[LinuxPPS] multiple access to /dev/ppsN entries

Ben Gardiner bengardiner at nanometrics.ca
Fri Mar 19 15:14:26 CET 2010


On Fri, Mar 19, 2010 at 10:07 AM, George Spelvin <linux at horizon.com> wrote:
>> I don't understand what 'offset' means in this context. Is it a time
>> offset or a position offset into a bytestream provided by /dev/ppsX?
>
> A time offset.  To be precise, the assert_off_tu and clear_off_tu
> fields of pps_params_t, which map on to the similary named fields
> of the pps_kparams structure.
>
> RFC2783 says, in the last paragraph of section 3.2, that
>
> # Since the offsets, if any, apply to all users of a given PPS source, the
> # implementation SHOULD impose access controls on the use of this feature;
> # for example, allowing only the super-user to set the offset values.
> # The default value for both offsets is zero.
>
>> I would like to have two separate processes use the same /dev/ppsX
>> entry to react to the same PPS 'events' and I am imagining doing so by
>> blocking reads in each application. It seems that if this offset is a
>> bytestream position then my two processes will race to get the event
>> information and inconsistent behaviour will result.
>
> No; it's a time delta which is applied to the captured timestamps.
> Each process has its own read pointer.  Each process will get all the
> events.
>

I see now. Thank you for the clarification.

Best Regards,
Ben Gardiner



More information about the LinuxPPS mailing list