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] Release transaction objects on thread termination


This patch removes the per-thread free-list of gtm_transaction objects.
With a single stable gtm_transaction object per thread, it is not
necessary anymore. Furthermore, a destructor function of a pthread TLS
key is used to release a thread's gtm_transaction object when this
thread terminates. This works even when transactions are used in other
TLS key's destructors because the key is initialized whenever a
transaction is used for the first time in a thread (or after a previous
destruction in this thread).
The test for the release doesn't really check that the release happens
(and can't because we do black-box testing), but at least it will
trigger the release twice.

OK for branch?

Attachment: patch5
Description: Text document


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