[Patch] Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*
Paolo Carlini
pcarlini@suse.de
Mon May 28 12:45:00 GMT 2007
Peter Dimov wrote:
> Benjamin Kosnik wrote:
>
>>> 2007-05-24 Paolo Carlini <pcarlini@suse.de>
>>>
>>> * include/ext/concurrence.h: Use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_*.
>>
>> Excellent news indeed.
>
> The macros seem pretty useful. Are they going to be in 4.3? I'm
> converting some boost::shared_ptr code to use __sync_* and running
> into the i386 'unresolved __sync_..._4' problem. What is the usual way
> to deal with that?
The macros are already in mainline and documented as builtin macros.
That means will certainly be in 4.3.x.
Well, the *usual* way to deal with that isn't really satisfactory, and
that't why I (we) decided to add the macros: the availability of the
atomic builtins depends on the actual -march etc switches and a "static"
autoconf test is always too conservative for such arches.
Paolo.
More information about the Libstdc++
mailing list