This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[trans-mem] tm_wrap support


In addition to all function cloning that the compiler can do for you automatically, the language spec allows for the programmer to build his own transaction-safe function variants. I get the idea that the primary reason to do this is to build transaction-safe variants of the standard runtime library functions. E.g.

void * __attribute__((tm_wrap(malloc)))
tm_malloc (size_t size)
{
  void *ret = malloc (size);
  if (ret)
    _ITM_addUserUndoAction (free, ret);
  return ret;
}

Anyway, this implements the tm_wrap attribute.


r~

Attachment: d-tm-wrap
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]