Committed with the changes below.
On Wed, 2011-10-19 at 12:17 -0700, Richard Henderson wrote:
> > Add support for TM-method-specific begin code.
> >
> > * libitm_i.h (GTM::gtm_restart_reason): Re-arrange and clean up
> > declarations.
> > * dispatch.h (GTM::abi_dispatch::begin_or_restart): New.
> > * method-serial.cc: Implement begin_or_restart().
> > * beginend.cc (GTM::gtm_thread::begin_transaction): Call
> > dispatch-specific begin_or_restart().
> > (GTM::gtm_thread::restart): Same.
>
> Ok except,
>
> > + // Run dispatch-specific restart code. Retry until we succeed.
> > + GTM::gtm_restart_reason rr;
> > + while ((rr = disp->begin_or_restart())
> > + != NUM_RESTARTS)
>
> Please add
>
> NO_RESTART = NUM_RESTARTS
>
> (or it's own number *after* NUM_RESTARTS, or -1, or something)
> to the enumeration and use that name. Using num_restarts here is confusing.
>
> > Fixed gtm_thread::serialirr_mode to actually use serialirr, not serial.
> >
> > * method-serial.cc (GTM::gtm_thread::serialirr_mode): Fixed: Use
> > serial-irrevocable dispatch, not serial.
>
> Ok.
>
> > Do not free transaction-local memory when committing a nested
> > transaction.
> >
> > * alloc.cc (commit_allocations_2): Do not free transaction-local
> > memory when committing a nested transaction.
>
> Ok.
>
> > Handle re-initialization of the current method group.
> >
> > * retry.cc (GTM::gtm_thread::decide_retry_strategy): Handle
> > re-initialization of the current method group.
> > * libitm_i.h (GTM::gtm_restart_reason): Add restart reason for
> > this.
>
> Ok.
>
> > Undo log is used for both thread-local and shared data.
> >
> > * libitm_i.h: Renamed gtm_local_undo to gtm_undolog_entry.
> > (GTM::gtm_thread): Renamed local_undo to undolog. Renamed
> > undolog-related member functions from *_local to *_undolog.
> > * local.cc (gtm_thread::commit_undolog): Same.
> > * beginend.cc (GTM::gtm_thread::trycommit): Same.
> > (GTM::gtm_thread::rollback): Roll back undolog before
> > dispatch-specific rollback.
>
> Ok.
>
> > Ensure privatization safety if requested by a TM method.
> >
> > * beginend.cc (GTM::gtm_thread::trycommit): Ensure privatization
> > safety if requested by a TM method.
> > * dispatch.h (GTM::abi_dispatch::trycommit): Add parameter for
> > privatization safety.
> > * method-serial.cc: Same.
>
> Ok.
>
> > Add gl_wt TM method.
> >
> > * libitm_i.h: Add gl_wt dispatch.
> > * retry.cc (parse_default_method): Same.
> > * method-gl.cc: New file.
> > * Makefile.am: Use method-gl.cc.
> > * Makefile.in: Rebuild.
>
> Ok with...
>
> > Fix gl_wt commit/rollback when serial lock has been acquired.
> >
> > * method-gl.cc (gl_wt_dispatch::trycommit): Fix interaction with
> > gtm_thread::shared_state when the serial lock is acquired.
> > (gl_wt_dispatch::rollback): Same.
>
> ... this merged with the previous commit.
>
> > Fix TLS read accesses on Linux/x86.
> >
> > * config/linux/x86/tls.h (abi_disp): Make TLS slot read
> > volatile.
> > (gtm_thr): Same.
>
> Ok.
>
>
> r~
>