projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[runtime] Add arch size InterlockedAdd
[mono.git]
/
mono
/
utils
/
atomic.h
diff --git
a/mono/utils/atomic.h
b/mono/utils/atomic.h
index 2fd9ebb27389386b12a0c6ae4c8b899ed086b17e..decab93c7a96e58094b18a6a97047fb533a8c0b2 100755
(executable)
--- a/
mono/utils/atomic.h
+++ b/
mono/utils/atomic.h
@@
-458,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_ */