[patch] libitm: Fix race condition in dispatch choice at transaction begin.

2012-02-13 Thread Torvald Riegel
This patch fixes a race condition in how transactions previously chose the dispatch at transaction begin: default_dispatch in retry.cc was read by transaction before they became either serial or nonserial transactions (with the serial_lock). A concurrent change of default_dispatch was possible

Re: [patch] libitm: Fix race condition in dispatch choice at transaction begin.

2012-02-13 Thread Richard Henderson
On 02/13/2012 03:03 PM, Torvald Riegel wrote: -// The default TM method used when starting a new transaction. -static GTM::abi_dispatch* default_dispatch = 0; +// The default TM method used when starting a new transaction. Initialized +// in number_of_threads_changed() below. +static