On Fri, 2015-10-02 at 14:13 -0400, Jason Merrill wrote:
> The patch also doesn't attempt to do anything about the library.  The 
> second patch sets transaction_safe on various built-ins, but without the 
> library support this just means references to undefined symbols.

For some of the builtins, we already have functions in the libitm ABI:
malloc and free, memcpy, memmove, memset.  See libitm/libitm.h.  Can you
transform those same as is already done for the respective C functions?

Other builtins should probably just transaction_pure: abort, I believe,
and I guess the math functions too (although I haven't thought about FP
exceptions at all so far).

For other builtins, I guess we should either map them to the
transactional variants of the respective C functions if we support those
already (but the builtins might not change errno whether the C functions
might do), or extend the libitm ABI with more _ITM_ functions.
If we just need the builtins for libstdc++, just making the builtins
tm_safe might be easier.

Thoughts?

> The 
> third patch is a beginning of libstdc++ support, which may or may not be 
> useful to Jonathan or Torvald in completing that support.

I'd at least need guidance from Jon how to best integrate the
annotations, and how to best ship transaction variants in libstdc++ (eg,
do they go into a separate library because of TS vs. libstdc++?)
I can add transactional versions for anything that the compiler doesn't
take care of when provided with the source code.  But I think those
cases should be rather rare.

Reply via email to