X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fatomic.h;h=decab93c7a96e58094b18a6a97047fb533a8c0b2;hb=e2b4f546cf3b87f70dc1245e076ed0e661f532ca;hp=2fd9ebb27389386b12a0c6ae4c8b899ed086b17e;hpb=decbfc3e736dfe0fb5b5e99fa1a072d013981086;p=mono.git diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h index 2fd9ebb2738..decab93c7a9 100755 --- 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_ */