Add comments.
[oota-llvm.git] / include / llvm / System / Atomic.h
index eeb4fe26da171f49e4e0402c81f65ce885afdd27..fc19369d11bdeb387f34ef02c741cea160736fad 100644 (file)
 #ifndef LLVM_SYSTEM_ATOMIC_H
 #define LLVM_SYSTEM_ATOMIC_H
 
-#include <stdint.h>
+#include "llvm/System/DataTypes.h"
 
 namespace llvm {
   namespace sys {
     void MemoryFence();
 
+#ifdef _MSC_VER
+    typedef long cas_flag;
+#else
     typedef uint32_t cas_flag;
+#endif
     cas_flag CompareAndSwap(volatile cas_flag* ptr,
-                             cas_flag new_value,
+                            cas_flag new_value,
                             cas_flag old_value);
+    cas_flag AtomicIncrement(volatile cas_flag* ptr);
+    cas_flag AtomicDecrement(volatile cas_flag* ptr);
+    cas_flag AtomicAdd(volatile cas_flag* ptr, cas_flag val);
+    cas_flag AtomicMul(volatile cas_flag* ptr, cas_flag val);
+    cas_flag AtomicDiv(volatile cas_flag* ptr, cas_flag val);
   }
 }