mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:44:13 +08:00
mdbx: fix _InterlockedExchangeAdd64 for some 32-bit SDKs.
Change-Id: I18280e8ef6432b9db3c5073fd59eaa102462f98d
This commit is contained in:
parent
897d4dbf87
commit
d14ca5cc4f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user