diff options
Diffstat (limited to 'ptw32_InterlockedCompareExchange.c')
-rw-r--r-- | ptw32_InterlockedCompareExchange.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ptw32_InterlockedCompareExchange.c b/ptw32_InterlockedCompareExchange.c index 898591d..74b9f15 100644 --- a/ptw32_InterlockedCompareExchange.c +++ b/ptw32_InterlockedCompareExchange.c @@ -35,6 +35,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#if 0 #ifndef _WIN64 #include "pthread.h" @@ -154,6 +155,7 @@ ptw32_InterlockedCompareExchange (PTW32_INTERLOCKED_LPLONG location, } +#if 0 /* * ptw32_InterlockedExchange -- * @@ -207,8 +209,6 @@ ptw32_InterlockedExchange (LPLONG location, * 'location' may have changed, in which case we will loop * back to do the MOV again. * - * FIXME! Need memory barriers for the MOV+CMPXCHG combo? - * * Tests show that this routine has almost identical timing * to Win32's InterlockedExchange(), which is much faster than * using the inlined 'xchg' instruction above, so it's probably @@ -249,8 +249,6 @@ L1: MOV eax,dword ptr [ecx] * 'location' may have changed, in which case we will loop * back to do the movl again. * - * FIXME! Need memory barriers for the MOV+CMPXCHG combo? - * * Tests show that this routine has almost identical timing * to Win32's InterlockedExchange(), and is much faster than * using an inlined 'xchg' instruction, so Win32 is probably @@ -288,6 +286,7 @@ L1: MOV eax,dword ptr [ecx] #endif } +#endif #if 1 @@ -297,11 +296,16 @@ L1: MOV eax,dword ptr [ecx] #define PTW32_INTERLOCKED_COMPARE_EXCHANGE ptw32_InterlockedCompareExchange #endif +#if 0 #if defined(PTW32_BUILD_INLINED) && defined(HAVE_INLINABLE_INTERLOCKED_XCHG) #undef PTW32_INTERLOCKED_EXCHANGE #define PTW32_INTERLOCKED_EXCHANGE ptw32_InterlockedExchange #endif +#endif #endif #endif + +#endif /* 0 */ + |