[v3] atomic update

Benjamin Kosnik bkoz@redhat.com
Thu Dec 11 09:23:00 GMT 2008


This updates the C++0x <cstdatomic> interface to the latest
draft (N2798), removes some now un-needed configure cruft, and
updates/adds to the testsuite. 

There are some outstanding issues:

1) atomic_flag is a standard layout type, not an aggregate. It has a
deleted copy constructor. Thus aggregate initialization (aka list init)
won't work without a single bool-value constructor. Added.

2) Ambiguity in conversion with the assignment operator for integral
types. This is fallout from removing the explicit from the single-value
constructor. Worked around by removing the volatile qualifier.

3) The compatibility interfaces are not declared with "C" linkage. 

4) The member functions for the atomic_integral types
specify certain required memory orders. For load/store in particular,
what happens when these requirements are not met? 

5) Support for ATOMIC_INTEGRAL_LOCK_FREE == 2 is provided via GCC
built-ins, with full barriers that may not respect the finer
grained memory orders C++0x supports.

Thanks to Jason for fixing c++/37906/38380/35782/37896/37860,
Richard for built-in sync feedback and advice, and Roland for
help testing on powerpc.

tested x86_64/linux: --disable-threads, ATOMIC_INTEGRAL_LOCK_FREE 0,1,2
tested darwin9.5.0
testing on powerpc4/linux in progress.

-benjamin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20081210-4.patch.bz2
Type: application/x-bzip
Size: 20257 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20081211/9e0713b9/attachment.bin>


More information about the Libstdc++ mailing list