From c898f7b85f5488730f906bac9fb0d1c4ad2570c0 Mon Sep 17 00:00:00 2001 From: Torvald Riegel Date: Sat, 24 Dec 2011 01:42:48 +0000 Subject: libitm: Don't enforce privatization safety if already in serial mode. libitm/ * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce privatization safety if already in serial mode. From-SVN: r182676 --- libitm/ChangeLog | 5 +++++ libitm/beginend.cc | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libitm/ChangeLog b/libitm/ChangeLog index abdf4fb..d2f0fd7 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,5 +1,10 @@ 2011-12-24 Torvald Riegel + * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce + privatization safety if already in serial mode. + +2011-12-24 Torvald Riegel + * beginend.cc (GTM::gtm_thread::restart): Add and handle finish_serial_upgrade parameter. * libitm.h (GTM::gtm_thread::restart): Adapt declaration. diff --git a/libitm/beginend.cc b/libitm/beginend.cc index 17f9d74..7975481 100644 --- a/libitm/beginend.cc +++ b/libitm/beginend.cc @@ -457,7 +457,12 @@ GTM::gtm_thread::trycommit () // The transaction is now inactive. Everything that we still have to do // will not synchronize with other transactions anymore. if (state & gtm_thread::STATE_SERIAL) - gtm_thread::serial_lock.write_unlock (); + { + gtm_thread::serial_lock.write_unlock (); + // There are no other active transactions, so there's no need to + // enforce privatization safety. + priv_time = 0; + } else gtm_thread::serial_lock.read_unlock (this); state = 0; -- cgit v1.1