Boost logo

Boost :

Subject: Re: [boost] [lock-free] CDS -yet another lock-free library
From: Helge Bahmann (hcb_at_[hidden])
Date: 2010-03-30 04:47:43


On Tue, 30 Mar 2010, Khiszinsky, Maxim wrote:

> Another example of MSVC optimization error for x86 - see my class
> cds::lock::RecursiveSpinT:
> void acquireLock()
> {
> // TATAS algorithm
> while ( !tryAcquireLock() ) {
> while ( m_spin.template load<membar_relaxed>() ) {
> backoff() ;
> // VC++ 2008 bug: the compiler generates infinite loop for int64 m_spin.

this is not a bug; the compiler is simply allowed to assume that the value
of a variable does not change intermittently

Regards
Helge


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