This is the mail archive of the
pthreads-win32@sourceware.org
mailing list for the pthreas-win32 project.
PTW32_INTERLOCKED_COMPARE_EXCHANGE is not working with wince and arm
- From: "Sinan KAYA" <sinan dot kaya at siemens dot com>
- To: <pthreads-win32 at sources dot redhat dot com>
- Date: Wed, 29 Nov 2006 09:20:26 +0200
- Subject: PTW32_INTERLOCKED_COMPARE_EXCHANGE is not working with wince and arm
hi,
if you have this combination of hardware and are trying to use pthreads,
then you will or won't realize that your
PTW32_INTERLOCKED_COMPARE_EXCHANGE function is not working.
PTW32_INTERLOCKED_COMPARE_EXCHANGE maps to ptw32_InterlockedExchange by
default. ptw32_InterlockedExchange function; however, is written for x86
processor.
Luckily wince already has InterlockedCompareExchange
The fix is to define
PTW32_INTERLOCKED_COMPARE_EXCHANGE to InterlockedCompareExchange in
implement.h
regards,
Sinan.