mdbx: fix _InterlockedExchangeAdd64 for some 32-bit SDKs.

Change-Id: I18280e8ef6432b9db3c5073fd59eaa102462f98d
This commit is contained in:
Leonid Yuriev 2018-01-07 02:56:06 +03:00 committed by Leo Yuriev
parent 897d4dbf87
commit d14ca5cc4f

View File

@ -569,8 +569,12 @@ static __inline uint64_t mdbx_atomic_add64(volatile uint64_t *p, uint64_t v) {
return __sync_fetch_and_add(p, v);
#else
#ifdef _MSC_VER
#ifdef _WIN64
return _InterlockedExchangeAdd64((volatile int64_t *)p, v);
#else
return InterlockedExchangeAdd64((volatile int64_t *)p, v);
#endif
#endif /* _MSC_VER */
#ifdef __APPLE__
return OSAtomicAdd64(v, (volatile int64_t *)p);
#endif