[PATCH v2] libstdc++: Make certain exceptions transaction_safe.
Torvald Riegel
triegel@redhat.com
Fri Jan 15 22:44:00 GMT 2016
On Thu, 2016-01-14 at 17:58 +0000, Jonathan Wakely wrote:
> On 07/01/16 17:47 +0100, Torvald Riegel wrote:
> >The attached patch makes some exceptions transaction-safe, as require by
> >the Transactional Memory TS. I believe I addressed all feedback for the
> >previous version of this patch (in particular, there are now more safety
> >checks for preconditions for this implementation (eg, that the new
> >allocator is used), all exceptions declared by the TM TS are now
> >supported (with the exception of tx_exception -- should I add that in a
> >follow-up patch?)
>
> Yes, that can be a separate patch, as it's adding a new type rather
> than modifying the existing ones to add this TM magic.
>
> >Thus, the patch adds txnal clones as required. They are new exported
> >symbols, but not visible to nontransactional code. The only changes to
> >headers is transaction_safe[_dynamic] annotations where required by the
> >TS, and a few friend declarations. The annotations are only enabled if
> >a user compiles with -fgnu-tm. IOW, the changes are pretty much
> >invisible when not using the TM TS.
>
> Thanks for adding all the clear comments as well. I'm sure we'll all
> be grateful for those when we come to look back at the code.
>
> >There are also commented-out calls to _ITM_setAssociatedException in the
> >code, which exist to show how we plan to support transaction
> >cancellation through exceptions (which needs some more libitm support
> >and bugfixes on the compiler side).
> >
> >Tested on x86_64-linux and x86-linux.
> >
> >OK?
>
> Yes, with some minor formatting changes noted below.
Addressed these, fixed a problem with using GLIBCXX_WEAK_DEFINITION
(which is only set on Darwin despite the generic-sounding name -- so
just use __attribute__((weak)) directly), and also updated
testsuite_abi.cc so that it knows about CXXABI_1.3.10.
Approved by Jonathan Wakely. Committed as r232454.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmts-safe-exc.patch
Type: text/x-patch
Size: 40135 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160115/678095c2/attachment.bin>
More information about the Libstdc++
mailing list