[EMAIL PROTECTED] wrote:
Author: faridz
Date: Fri Aug 10 11:00:54 2007
New Revision: 564698
URL: http://svn.apache.org/viewvc?view=rev&rev=564698
Log:
2007-08-10 Farid Zaripov <[EMAIL PROTECTED]>
* _mutex.h (__rw_atomic_preincrement) [_WIN32]: Cast __x to int& instead of
long&
to use InterlockedIncrement() optimized function instead of generic one
using
critical sections.
Really? The long overload should do the "right thing" when
long and int are the same size. If it doesn't it's our bug.
Martin
Modified:
incubator/stdcxx/trunk/include/rw/_mutex.h
Modified: incubator/stdcxx/trunk/include/rw/_mutex.h
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_mutex.h?view=diff&rev=564698&r1=564697&r2=564698
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_mutex.h (original)
+++ incubator/stdcxx/trunk/include/rw/_mutex.h Fri Aug 10 11:00:54 2007
@@ -1371,7 +1371,7 @@
inline unsigned int
__rw_atomic_preincrement (unsigned int &__x, bool)
{
- return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),
+ return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int&, __x),
false);
}