diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-01-22 16:05:52 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-22 16:05:52 -0500 |
commit | a2cabfcd89d8ac45a60fb35847258567c3450560 (patch) | |
tree | 49919ca7302ea899df93e5d9958590bdccb0370a /driver_tsip.c | |
parent | fbc716f9e36491c80b426bff36295c1cb0c2dc31 (diff) | |
download | gpsd-a2cabfcd89d8ac45a60fb35847258567c3450560.tar.gz |
Introduce an adaptive delay into the main loop to prevent select buzzing.
When select(2) returns too fast with only small amounts of data, the main loop
will buzz and eat power - a significant issue on, e.g. battery-powered RasPi
devices, where it was first spotted. This code watches read volume and delays
when it sees lots of small bursts.
All regressiion tests pass. But note: the adaptive-delay logic has to
suppress delays to arrange this, otherwise we get an all too familiar
class of spurious test failure.
Diffstat (limited to 'driver_tsip.c')
0 files changed, 0 insertions, 0 deletions