Subject: Re: [boost] [thread] Can Boost.Thread use Boost.Atomic without falling on a compatibility issue?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-01-13 13:43:06
Le 13/01/13 19:15, Andrey Semashev a écrit :
> On Sun, Jan 13, 2013 at 10:04 PM, Vicente J. Botet Escriba
> <vicente.botet_at_[hidden]> wrote:
>>> The patch also adds some heuristic code for detecting an atomic-compatible
>>> integer type to even better avoid using the spinlock pool of Boost.Atomic.
>> Great. Does it mean that Boost.Thread must link with Boost.Atomic when when
>> the spinlock pool is needed?
> Yes, Boost.Thread has to link with Boost.Atomic if the spinlock pool
> is used. You can always link and hope the linker eliminates the
> dependency when not needed.
>> Is there a know platform/compiler for which the condition
>> BOOST_ATOMIC_INT_LOCK_FREE == 2
>> || BOOST_ATOMIC_SHORT_LOCK_FREE == 2
>> || BOOST_ATOMIC_CHAR_LOCK_FREE == 2
>> || BOOST_ATOMIC_LONG_LOCK_FREE == 2
>> || (defined(BOOST_HAS_LONG_LONG) && BOOST_ATOMIC_LLONG_LOCK_FREE == 2)
>> is false?
> Any platform not supported by Boost.Atomic. The condition will be
> positive on any platform currently supported by Boost.Atomic.
I would like to have an alternative for these platforms to avoid making
Boost.Thread fail just because Boost.Atomic is not supported.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk