From 79ee92ac14280fdfeddc881c8928175831aa0cbe Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Mon, 5 Oct 2015 11:55:44 -0700 Subject: Tweak a commment about SHMMEM handling. --- shmexport.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'shmexport.c') 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(); -- cgit v1.2.1