summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-28 05:39:09 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-28 05:39:09 -0400
commit66e1a41db58c6374fc92a5dc6ca12a5367a15355 (patch)
treedf1526ebe6f85cb66263a840190461dc3b6c1431
parent3e7fb419ed47a875888461776c3f4b6c54a16660 (diff)
downloadgpsd-66e1a41db58c6374fc92a5dc6ca12a5367a15355.tar.gz
The shm transport finallly works through gps_open().
-rw-r--r--libgps_core.c3
-rw-r--r--shmexport.c1
2 files changed, 2 insertions, 2 deletions
diff --git a/libgps_core.c b/libgps_core.c
index a326f4a3..c35ccbc5 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -112,8 +112,7 @@ int gps_read(struct gps_data_t *gpsdata)
#ifdef SHM_EXPORT_ENABLE
if (gpsdata->gps_fd == -1) {
- gps_shm_read(gpsdata);
- status = 0;
+ status = gps_shm_read(gpsdata);
}
#endif /* SHM_EXPORT_ENABLE */
diff --git a/shmexport.c b/shmexport.c
index c79d4c08..eaf8ddf6 100644
--- a/shmexport.c
+++ b/shmexport.c
@@ -82,6 +82,7 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata)
memcpy((void *)(context->shmexport + offsetof(struct shmexport_t, gpsdata)),
(void *)gpsdata,
sizeof(struct gps_data_t));
+ barrier();
shared->gpsdata.gps_fd = -1;
barrier();
shared->bookend1 = tick;