Bump API snapshot submodule
[mono.git] / mono / utils / atomic.h
index dca6170a1a1e72cfe2f03cc77a5ce9a2895e1d6d..decab93c7a96e58094b18a6a97047fb533a8c0b2 100755 (executable)
@@ -1,5 +1,6 @@
-/*
- * atomic.h:  Atomic operations
+/**
+ * \file
+ * Atomic operations
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
@@ -457,4 +458,10 @@ extern void InterlockedWritePointer(volatile gpointer *dst, gpointer val);
 
 #endif
 
+#if SIZEOF_VOID_P == 4
+#define InterlockedAddP(p,add) InterlockedAdd ((volatile gint32*)p, (gint32)add)
+#else
+#define InterlockedAddP(p,add) InterlockedAdd64 ((volatile gint64*)p, (gint64)add)
+#endif
+
 #endif /* _WAPI_ATOMIC_H_ */