diff options
author | Torvald Riegel <triegel@redhat.com> | 2012-10-24 19:52:02 +0000 |
---|---|---|
committer | Torvald Riegel <torvald@gcc.gnu.org> | 2012-10-24 19:52:02 +0000 |
commit | b679c81340ece3ceecbd74d46a1af6fe473813bc (patch) | |
tree | eb6dab1987f0c9c1f49fce76ba1dd1d8267e3277 /libitm/method-serial.cc | |
parent | 1a6c552d12026ee85c819dfe6f2c83bc59aaa28f (diff) | |
download | gcc-b679c81340ece3ceecbd74d46a1af6fe473813bc.tar.gz |
Ask dispatch whether it requires serial mode.
* retry.cc (gtm_thread::decide_begin_dispatch): Ask dispatch whether
it requires serial mode instead of assuming that for certain
dispatchs.
* dispatch.h (abi_dispatch::requires_serial): New.
(abi_dispatch::abi_dispatch): Adapt.
* method-gl.cc (gl_wt_dispatch::gl_wt_dispatch): Adapt.
* method-ml.cc (ml_wt_dispatch::ml_wt_dispatch): Same.
* method-serial.cc (serialirr_dispatch::serialirr_dispatch,
serial_dispatch::serial_dispatch,
serialirr_onwrite_dispatch::serialirr_onwrite_dispatch): Same.
From-SVN: r192777
Diffstat (limited to 'libitm/method-serial.cc')
-rw-r--r-- | libitm/method-serial.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libitm/method-serial.cc b/libitm/method-serial.cc index bdecd7b87b3..09cfdd4a175 100644 --- a/libitm/method-serial.cc +++ b/libitm/method-serial.cc @@ -50,13 +50,15 @@ static serial_mg o_serial_mg; class serialirr_dispatch : public abi_dispatch { public: - serialirr_dispatch() : abi_dispatch(false, true, true, false, &o_serial_mg) + serialirr_dispatch() : abi_dispatch(false, true, true, false, + gtm_thread::STATE_SERIAL | gtm_thread::STATE_IRREVOCABLE, &o_serial_mg) { } protected: serialirr_dispatch(bool ro, bool wt, bool uninstrumented, - bool closed_nesting, method_group* mg) : - abi_dispatch(ro, wt, uninstrumented, closed_nesting, mg) { } + bool closed_nesting, uint32_t requires_serial, method_group* mg) : + abi_dispatch(ro, wt, uninstrumented, closed_nesting, requires_serial, mg) + { } // Transactional loads and stores simply access memory directly. // These methods are static to avoid indirect calls, and will be used by the @@ -151,7 +153,9 @@ public: CREATE_DISPATCH_METHODS(virtual, ) CREATE_DISPATCH_METHODS_MEM() - serial_dispatch() : abi_dispatch(false, true, false, true, &o_serial_mg) { } + serial_dispatch() : abi_dispatch(false, true, false, true, + gtm_thread::STATE_SERIAL, &o_serial_mg) + { } }; @@ -162,7 +166,7 @@ class serialirr_onwrite_dispatch : public serialirr_dispatch { public: serialirr_onwrite_dispatch() : - serialirr_dispatch(false, true, false, false, &o_serial_mg) { } + serialirr_dispatch(false, true, false, false, 0, &o_serial_mg) { } protected: static void pre_write() |