summaryrefslogtreecommitdiff
path: root/libgps_shm.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-05 20:21:42 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-05 20:21:42 -0500
commit032607920d8d6f335e3bfbca1fc76e9d77dc7457 (patch)
tree632e28102497e16d43be91ca0dbcec5a7ed5041c /libgps_shm.c
parent6a0157a94666ae5a653bc297aedc1f6c8f1eaf3a (diff)
downloadgpsd-032607920d8d6f335e3bfbca1fc76e9d77dc7457.tar.gz
Full splint cleanup. Partial cppcheck cleanup.
Diffstat (limited to 'libgps_shm.c')
-rw-r--r--libgps_shm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libgps_shm.c b/libgps_shm.c
index f25a07e4..88b340e8 100644
--- a/libgps_shm.c
+++ b/libgps_shm.c
@@ -70,12 +70,11 @@ bool gps_shm_waiting(const struct gps_data_t *gpsdata, int timeout)
/* check to see if new data has been written */
{
volatile struct shmexport_t *shared = (struct shmexport_t *)PRIVATE(gpsdata)->shmseg;
- bool newdata;
timestamp_t basetime = timestamp();
/* busy-waiting sucks, but there's not really an alternative */
for (;;) {
- newdata = false;
+ bool newdata = false;
barrier();
if (shared->bookend1 == shared->bookend2 && shared->bookend1 > PRIVATE(gpsdata)->tick)
newdata = true;