[llvm-commits] [llvm] r71959 - /llvm/trunk/include/llvm/System/Atomic.h

Owen Anderson resistor at mac.com
Sat May 16 14:08:26 PDT 2009


Author: resistor
Date: Sat May 16 16:08:25 2009
New Revision: 71959

URL: http://llvm.org/viewvc/llvm-project?rev=71959&view=rev
Log:

Remove the volatile marker from the cas_flag typedef, fixing some warnings.  
 It's now the client's resposibility to add it in when needed

Modified:
    llvm/trunk/include/llvm/System/Atomic.h

Modified: llvm/trunk/include/llvm/System/Atomic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Atomic.h?rev=71959&r1=71958&r2=71959&view=diff

==============================================================================
--- llvm/trunk/include/llvm/System/Atomic.h (original)
+++ llvm/trunk/include/llvm/System/Atomic.h Sat May 16 16:08:25 2009
@@ -46,7 +46,7 @@
       __sync_synchronize();
     }
 
-    typedef volatile uint32_t cas_flag;
+    typedef uint32_t cas_flag;
     inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
       return __sync_val_compare_and_swap(dest, exc, c);
     }
@@ -56,7 +56,7 @@
       OSMemoryBarrier();
     }
 
-    typedef volatile int32_t cas_flag;
+    typedef int32_t cas_flag;
     inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) {
       cas_flag old = *dest;
       OSAtomicCompareAndSwap32(c, exc, dest);





More information about the llvm-commits mailing list