|
Boost : |
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:04:26
Le 13/01/13 17:15, Andrey Semashev a écrit :
> On Sunday 13 January 2013 16:08:28 Vicente J. Botet Escriba wrote:
>> Could you work on complementing your patch to take care of the C++11
>> interface?
> I have updated the patch in the ticket #5752 with the C++11 definition of
> atomic_flag. Note that the new patch disables the
> BOOST_THREAD_PROVIDES_ONCE_CXX11 macro when constexpr is not available.
It is OK. I will update the documentation to clarify this point.
> 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?
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?
I have included your implementation conditionally in separated files
once_atomic.hpp and once_atomic.cpp. I will commit it this evening after
I run my regression tests and I'll activate your implementation in order
to see how the Boost regression tests behave. I hope that everything
will be OK.
Thanks for your contribution.
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk