gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] gpsd processor load


From: Håkan Johansson
Subject: Re: [gpsd-dev] gpsd processor load
Date: Thu, 31 Oct 2013 09:14:44 +0100
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)


Loose thoughts:

On Thu, 31 Oct 2013, Gary E. Miller wrote:

I think select() will return a ready fd with no data bytes from
read() when a control line changes.

Thn the PPS thread would wake up on every character as well.  Not good.

It would also mean that the PPS thread might steal real data when read() does return something useful. Also bad.

Question: the reason for having the PPS thread in the first place is that not that one cannot mix the select() and TIOCMIWAIT waiting in the main thread?

If the BSDs really do tell about line changes by a 'spurious' select() event, then perhaps one should not use a separate thread at all and put the line change check (i.e. TIOCMGET) in the main thread.

This might not work for the short (microsecond) pulses. Those perhaps can be gotten most of the time by assuming them on really spurious select returns, i.e. when there really was no data to get.

Cheers,
Håkan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]