summaryrefslogtreecommitdiff
path: root/shmexport.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-10-05 11:55:44 -0700
committerGary E. Miller <gem@rellim.com>2015-10-05 11:55:44 -0700
commit79ee92ac14280fdfeddc881c8928175831aa0cbe (patch)
treebb3aa47763945f2bad1ca17eaa4d923e3a9941b4 /shmexport.c
parentfd0055547841966d2b7815cc8ca515879a0ac1ae (diff)
downloadgpsd-79ee92ac14280fdfeddc881c8928175831aa0cbe.tar.gz
Tweak a commment about SHMMEM handling.
Diffstat (limited to 'shmexport.c')
-rw-r--r--shmexport.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shmexport.c b/shmexport.c
index a69e6cb1..179a6142 100644
--- a/shmexport.c
+++ b/shmexport.c
@@ -87,6 +87,11 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata)
* Reader copies what it sees in normal order; that way, if we
* start to write the segment during the read, the second bookend will
* get clobbered first and the data can be detected as bad.
+ *
+ * Of course many architectures, like Intel, make no guarantees
+ * about the actual memory read or write order into RAM, so this
+ * is partly wishful thinking. Thus the need for the memory_barriers()
+ * to enforce the required order.
*/
shared->bookend2 = tick;
memory_barrier();