From 387c37edd6e6df0fe66ea6ece2eb94e74d04897d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 7 May 2012 23:27:23 -0400 Subject: Explain a race condition. --- gpsd.xml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'gpsd.xml') diff --git a/gpsd.xml b/gpsd.xml index c39e92d0..43f09c47 100644 --- a/gpsd.xml +++ b/gpsd.xml @@ -152,10 +152,11 @@ commands that edit the daemon's internal device list. -b -Broken-device-safety mode, otherwise known as read-only -mode. Some popular bluetooth and USB receivers lock up or become -totally inaccessible when probed or reconfigured. This switch prevents -gpsd from writing to a receiver. This means that +Broken-device-safety mode, otherwise known as +read-only mode. A few bluetooth and USB receivers lock up or become +totally inaccessible when probed or reconfigured; thee the hardware +compatibiklity list on the GPSD project website for details. This +switch prevents gpsd from writing to a receiver. This means that gpsd cannot configure the receiver for optimal performance, but it also means that gpsd cannot break the receiver. A better @@ -827,9 +828,26 @@ in GCC 3.x at -O2, into generating bad code. Devices meant to to use PPS for high-precision timekeeping may fail if they are specified after startup by a control-socket command, -as opposed to on the daemon's original command line. (Root privileges +as opposed to on the daemon's original command line. Root privileges are dropped early, and some Unix varients require them in order to set -the PPS line discipline.) +the PPS line discipline. Under Linux the POSIX capability to set the +line discipline is retained, but other platforms cannot use this +code. + +USB GPS devices do not identify themselves through the USB +subsystem; they typically present as the class 00h (undefined) or +class FFh (vendor-specific) of USB-to-serial adapters. Because of +this, the Linux hotplug scripts must tell +gpsd to sniff data from every USB-to-serial +adapter that goes active and is known to be of a type used in +GPSes. No such device is sent configuration strings until after it has +been identified as a GPS, and gpsd never +opens a device that is opened by another process. But there is a tiny +window for non-GPS devices not opened; if the application that wants +them loses a race with GPSD its device open will fail and have to be +retried after GPSD sniffs the device (normally less than a second +later). + FILES -- cgit v1.2.1