[ntp:questions] Befuddled and confused, again...
nomail at example.com
Tue Feb 16 17:06:11 UTC 2010
unruh <unruh at wormhole.physics.ubc.ca> wrote:
> On 2010-02-16, Rob <nomail at example.com> wrote:
>> unruh <unruh at wormhole.physics.ubc.ca> wrote:
>>> Now, I am not sure whether gpsd will run on bsd, but I suspect it should
>>> not be hard to convert it to do so. The ioctl calls to the serial port
>>> or parallel port may well be different, but there are very few of them
>>> in the code.
>> There may be few of them, but one is very essential.
>> When there is no equivalent of TIOCMIWAIT available in your os, it will
>> be very hard to convert the code.
>> TIOCMIWAIT is the ioctl that returns precisely at the moment when a
>> handshake line (passed as a parameter) changes state. This is
>> functionality you cannot simply emulate by calling some other ioctls.
> And you are trying to claim that BSD has no equivalent functionality?
No, I don't know anything about BSD.
> I simply do not believe that. It may be called something else, but that
> is what "convert" means.
The package was ported to BSD. I don't know if the person who did
that port already tried.
> Besides it cannot return at "precisely" the moment. If it polls, it
> depends on how long the poll intrval is. Only a few of the lines are
> interrupt driven and I still do not know if TIOCMIWAIT uses interrupts
> if they are available.
It does not poll. It uses the interrupt that can be enabled to occur
when a status line changes state. Of course it cannot return precisely
at that moment with femtosecond accuracy, but it schedules the process
at the time the interrupt came in and at that time the process reads
the system time. A kernel native PPS support would be better, but in
practice it works fine.
More information about the questions