]> git.ipfire.org Git - thirdparty/gcc.git/commit
libitm: Fix race condition in dispatch choice at transaction begin.
authorTorvald Riegel <triegel@redhat.com>
Mon, 20 Feb 2012 13:06:07 +0000 (13:06 +0000)
committerTorvald Riegel <torvald@gcc.gnu.org>
Mon, 20 Feb 2012 13:06:07 +0000 (13:06 +0000)
commita19db3f2e39d927e1595bbb6b9f4470c57161c7d
treeab52139ec839cdce4a63ce4b77072d1d850159b8
parent5a226e0af1d34600e38f02e3e84485db3f96b56c
libitm: Fix race condition in dispatch choice at transaction begin.

libitm/
* beginend.cc (GTM::gtm_thread::begin_transaction): Move serial lock
acquisition to ...
* retry.cc (GTM::gtm_thread::decide_begin_dispatch): ... here.
(default_dispatch): Make atomic.
(GTM::gtm_thread::set_default_dispatch): Access atomically.
(GTM::gtm_thread::decide_retry_strategy): Access atomically and
use decide_begin_dispatch() if default_dispatch might have changed.
(GTM::gtm_thread::number_of_threads_changed): Initialize
default_dispatch here.

From-SVN: r184392
libitm/ChangeLog
libitm/beginend.cc
libitm/retry.cc