mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-25 21:54:28 +08:00
mdbx-windows: more for WindowsXP support.
Change-Id: Ide34048720989fc010f48e086569e12e8c1edca1
This commit is contained in:
@@ -649,7 +649,7 @@ static __inline uint32_t mdbx_atomic_add32(volatile uint32_t *p, uint32_t v) {
|
||||
return __sync_fetch_and_add(p, v);
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
return _InterlockedExchangeAdd(p, v);
|
||||
return _InterlockedExchangeAdd((volatile long *)p, v);
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
return OSAtomicAdd32(v, (volatile int32_t *)p);
|
||||
@@ -689,7 +689,7 @@ static __inline bool mdbx_atomic_compare_and_swap32(volatile uint32_t *p,
|
||||
return __sync_bool_compare_and_swap(p, c, v);
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
return c == _InterlockedCompareExchange(p, v, c);
|
||||
return c == _InterlockedCompareExchange((volatile long *)p, v, c);
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
return c == OSAtomicCompareAndSwap32Barrier(c, v, (volatile int32_t *)p);
|
||||
|
Reference in New Issue
Block a user