> -----Original Message-----
> From: Martin Sebor [mailto:[EMAIL PROTECTED] 
> 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.

Reply via email to