Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2004-05-15 11:40:13


Michael Glassford wrote:
>
> I've just checked in changes to Win32 implementations of the mutex and
> recursive_mutex classes. They now use a Win32 critical section instead

MS critical section (current implementation) doesn't perform well
if there is contention. They handoff ownership. You can build more
efficient mutex (with all three lock/trylock/timedlock operations)
using atomic swap/xchg and auto-reset event. It will work on 386
(no CAS required)... but I just can't stop scratching my head over
mysterious lack of xchg.rel on Itanic (they only have xchg.acq).

regards,
alexander.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk