diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-12-15 17:07:43 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-12-15 17:07:43 +0100 |
commit | 0d28ae37e5cc4a8a3d5e869345c471dc2ea92e96 (patch) | |
tree | ae1740b7c112b8ed44c47815128f24b17fe4478e | |
parent | e74991d4a62a0064a4538e2edd8636a2d3855480 (diff) | |
download | mariadb-git-0d28ae37e5cc4a8a3d5e869345c471dc2ea92e96.tar.gz |
Fixed 64-bit atomics on Win x86 and removed support for 8 and 16-bit atomic operations
-rw-r--r-- | include/atomic/generic-msvc.h | 13 | ||||
-rw-r--r-- | include/my_atomic.h | 7 |
2 files changed, 4 insertions, 16 deletions
diff --git a/include/atomic/generic-msvc.h b/include/atomic/generic-msvc.h index e317e7dc4cc..77319aaa93c 100644 --- a/include/atomic/generic-msvc.h +++ b/include/atomic/generic-msvc.h @@ -37,29 +37,18 @@ C_MODE_START /*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/ LONG _InterlockedExchange (LONG volatile *Target,LONG Value); -LONGLONG _InterlockedExchange64 (LONGLONG volatile *Target,LONGLONG Value); -LONG _InterlockedCompareExchange (LONG volatile *Target, - LONG Value, LONG Comp); -LONGLONG _InterlockedCompareExchange64 (LONGLONG volatile *Target, - LONGLONG Value, LONGLONG Comp); +LONG _InterlockedCompareExchange (LONG volatile *Target, LONG Value, LONG Comp); LONG _InterlockedExchangeAdd (LONG volatile *Addend, LONG Value); -LONGLONG _InterlockedExchangeAdd64 (LONGLONG volatile *Addend, LONGLONG Value); C_MODE_END #pragma intrinsic(_InterlockedExchangeAdd) #pragma intrinsic(_InterlockedCompareExchange) #pragma intrinsic(_InterlockedExchange) -#pragma intrinsic(_InterlockedExchangeAdd64) -#pragma intrinsic(_InterlockedCompareExchange64) -#pragma intrinsic(_InterlockedExchange64) #endif #define InterlockedExchange _InterlockedExchange #define InterlockedExchangeAdd _InterlockedExchangeAdd #define InterlockedCompareExchange _InterlockedCompareExchange -#define InterlockedExchange64 _InterlockedExchange64 -#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64 -#define InterlockedCompareExchange64 _InterlockedCompareExchange64 /* No need to do something special for InterlockedCompareExchangePointer as it is a #define to InterlockedCompareExchange. The same applies to diff --git a/include/my_atomic.h b/include/my_atomic.h index 4170e45fe8c..23c3dc749ab 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -56,11 +56,10 @@ #define intptr void * /** - On most platforms we implement 8-bit, 16-bit, 32-bit and "pointer" - operations. Thus the symbol below is defined by default; platforms - where we leave out 8-bit or 16-bit operations should undefine it. + Currently we don't support 8-bit and 16-bit operations. + It can be added later if needed. */ -#define MY_ATOMIC_HAS_8_16 1 +#undef MY_ATOMIC_HAS_8_16 #ifndef MY_ATOMIC_MODE_RWLOCKS /* |