summaryrefslogtreecommitdiff
path: root/libitm/method-gl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libitm/method-gl.cc')
-rw-r--r--libitm/method-gl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libitm/method-gl.cc b/libitm/method-gl.cc
index 87d01dbf1f1d..b2e2bcad71e6 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()