diff options
author | Torvald Riegel <triegel@redhat.com> | 2011-12-24 01:42:48 +0000 |
---|---|---|
committer | Torvald Riegel <torvald@gcc.gnu.org> | 2011-12-24 01:42:48 +0000 |
commit | c898f7b85f5488730f906bac9fb0d1c4ad2570c0 (patch) | |
tree | e009d551aaef7b58ada2c219361dd260fdadd8ce /libitm/beginend.cc | |
parent | 610e39013598f4f3bc66c117c3402c07b517cfa0 (diff) | |
download | gcc-c898f7b85f5488730f906bac9fb0d1c4ad2570c0.tar.gz |
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
Diffstat (limited to 'libitm/beginend.cc')
-rw-r--r-- | libitm/beginend.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libitm/beginend.cc b/libitm/beginend.cc index 17f9d7490d8..797548192eb 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; |