stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: svn commit: r564698 - /incubator/stdcxx/trunk/include/rw/_mutex.h
Date Sun, 12 Aug 2007 14:29:13 GMT
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Friday, August 10, 2007 9:30 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: svn commit: r564698 - 
> /incubator/stdcxx/trunk/include/rw/_mutex.h
> 
> > 	* _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.

  It does, but it's defined later than invoked from unsigned in
overload,
and compiler invokes the template<long> __rw_atomic_preincrement(...)
which uses critical section.

Farid.

Mime
View raw message