summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-08 12:37:08 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-09 09:59:16 +0200
commit70962d761a364364f2809262a299829f35c1dd1e (patch)
treee833a0ecdab7aea0d9f5e4d474784482d101aec2 /libshouldbeinlibc
parent06275e247873f44b2a5045df160bf55ec46918dc (diff)
libshouldbeinlibc/maptime: use memory fences
* libshouldbeinlibc/maptime.h (maptime_read): Use memory fences.
Diffstat (limited to 'libshouldbeinlibc')
-rw-r--r--libshouldbeinlibc/maptime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libshouldbeinlibc/maptime.h b/libshouldbeinlibc/maptime.h
index 947ad640..04ce0353 100644
--- a/libshouldbeinlibc/maptime.h
+++ b/libshouldbeinlibc/maptime.h
@@ -51,7 +51,9 @@ maptime_read (volatile struct mapped_time_value *mtime, struct timeval *tv)
do
{
tv->tv_sec = mtime->seconds;
+ __sync_synchronize ();
tv->tv_usec = mtime->microseconds;
+ __sync_synchronize ();
}
while (tv->tv_sec != mtime->check_seconds);
}