Description: Make the Load operation truly atomic
Author: Gert Wollny <gw.fossdev@gmail.com>
Forwarded: https://issues.itk.org/jira/browse/ITK-3413
Last-Update: 2016-07-09

--- a/Modules/Core/Common/include/itkAtomicIntDetail.h
+++ b/Modules/Core/Common/include/itkAtomicIntDetail.h
@@ -118,8 +118,7 @@
 
   static ValueType Load(const ValueType *ref)
   {
-    __sync_synchronize();
-    return *static_cast<const volatile ValueType *>(ref);
+    return __sync_add_and_fetch(const_cast<ValueType*>(ref), 0);
   }
 
   static void Store(ValueType *ref, ValueType val)
