Re: [boost] Re: [Boost.Thread] mutex Win32 implementation changes
by Peter Dimov other posts by this author
Jul 20 2004 2:24PM messages near this date
Re: [boost] Re: [Boost.Thread] mutex Win32 implementation changes
|
[boost] Re: [Boost.Thread] mutex Win32 implementation changes
Alexander Terekhov wrote:
> Peter Dimov wrote:
> [...]
> > Here's TryEnterCriticalSection (-recursivity) for reference:
> >
> > bool try_lock( critical_section * p )
> > {
> > return atomic_compare_exchange( p->LockCount, -1, 0 ) == 0;
> > }
>
> The point of "swap based mutex" exercise was to avoid CAS because
> i386 doesn't have it. With CAS (and absent timedlock operation),
> it can be made safe and fast (better than MS "critical" stuff).
Why is i386 support important (for a Windows mutex implementation, I mean)?
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Michael Glassford
Alexander Terekhov
Alexander Terekhov
Alexander Terekhov
Peter Dimov
Alexander Terekhov
Alexander Terekhov
Alexander Terekhov
val salamakha
val salamakha
val salamakha
val salamakha
Peter Dimov
Alexander Terekhov
Peter Dimov
Alexander Terekhov
Peter Dimov
Peter Dimov
Alexander Terekhov
Peter Dimov
Alexander Terekhov
Alexander Terekhov
Alexander Terekhov
Alexander Terekhov
Alexander Terekhov
Michael Glassford
Alexander Terekhov
Michael Glassford
|