summaryrefslogtreecommitdiff
path: root/libitm/method-serial.cc
diff options
context:
space:
mode:
authortorvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-24 19:52:02 +0000
committertorvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-24 19:52:02 +0000
commitf0de1163ef09e28e4b13f61214a8b88b10a9090b (patch)
treeeb6dab1987f0c9c1f49fce76ba1dd1d8267e3277 /libitm/method-serial.cc
parent447002cc56e7eab79142c2e1cc48e06bd60a83e4 (diff)
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192777 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm/method-serial.cc')
-rw-r--r--libitm/method-serial.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/libitm/method-serial.cc b/libitm/method-serial.cc
index bdecd7b87b32..09cfdd4a1752 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()