From 629e47295b44d9adf01b66061dd891a25e567474 Mon Sep 17 00:00:00 2001 From: Torvald Riegel Date: Wed, 13 Jan 2016 12:40:34 +0000 Subject: libitm: Fix privatization safety interaction with serial mode. From-SVN: r232322 --- libitm/method-gl.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libitm/method-gl.cc') diff --git a/libitm/method-gl.cc b/libitm/method-gl.cc index 87d01db..b2e2bca 100644 --- a/libitm/method-gl.cc +++ b/libitm/method-gl.cc @@ -338,6 +338,15 @@ public: } + virtual bool snapshot_most_recent() + { + // This is the same check as in validate() except that we do not restart + // on failure but simply return the result. + return o_gl_mg.orec.load(memory_order_relaxed) + == gtm_thr()->shared_state.load(memory_order_relaxed); + } + + CREATE_DISPATCH_METHODS(virtual, ) CREATE_DISPATCH_METHODS_MEM() -- cgit v1.1