[patch] libstdc++/57250 shared_ptr atomic operations

Jonathan Wakely jwakely@redhat.com
Wed Nov 12 23:55:00 GMT 2014


On 17/10/14 19:27 +0100, Jonathan Wakely wrote:
>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.

And also tested on powerpc64-linux. Committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 19732 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20141112/5c9cef77/attachment.bin>


More information about the Libstdc++ mailing list