libitm: Don't enforce privatization safety if already in serial mode.
authorTorvald Riegel <triegel@redhat.com>
Sat, 24 Dec 2011 01:42:48 +0000 (01:42 +0000)
committerTorvald Riegel <torvald@gcc.gnu.org>
Sat, 24 Dec 2011 01:42:48 +0000 (01:42 +0000)
libitm/
* beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
privatization safety if already in serial mode.

From-SVN: r182676

libitm/ChangeLog
libitm/beginend.cc

index abdf4fb62d8a226947f21a044fe1e2ac99d34ab3..d2f0fd752f084cf9c14efe0a9c550957c296daf9 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-24  Torvald Riegel  <triegel@redhat.com>
+
+       * beginend.cc (GTM::gtm_thread::trycommit): Don't enforce
+       privatization safety if already in serial mode.
+
 2011-12-24  Torvald Riegel  <triegel@redhat.com>
 
        * beginend.cc (GTM::gtm_thread::restart): Add and handle
index 17f9d7490d898f4caa0e2c75429fd5eb3ef89914..797548192eb1641e91502175982ffb7bbf151cff 100644 (file)
@@ -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;