[patch] libstdc++/57250 shared_ptr atomic operations

Jonathan Wakely jwakely@redhat.com
Fri Oct 17 18:28:00 GMT 2014


I'm not very proud of this solution, but unless anyone has a better
ideas this is how I plan to add the atomic operations for shared_ptr.

I used __gnu_cxx::__mutex instead of std::mutex because it has fewer
dependencies, so the atomic operations should always be available for
shared_ptr even when the target doesn't support C++11 threads.

The operations are also defined for the __shared_ptr class template.

Tested x86_64-linux.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 19728 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20141017/c6b72cbc/attachment.bin>


More information about the Libstdc++ mailing list