diff options
author | Torvald Riegel <triegel@redhat.com> | 2016-01-13 12:40:34 +0000 |
---|---|---|
committer | Torvald Riegel <torvald@gcc.gnu.org> | 2016-01-13 12:40:34 +0000 |
commit | 629e47295b44d9adf01b66061dd891a25e567474 (patch) | |
tree | 0f4bfc83fa01d0a035d86c869e199905d89075cb /libitm/method-gl.cc | |
parent | 8bc47ae2a784685f79dca8d7d04135c939a49452 (diff) |
libitm: Fix privatization safety interaction with serial mode.
From-SVN: r232322
Diffstat (limited to 'libitm/method-gl.cc')
-rw-r--r-- | libitm/method-gl.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libitm/method-gl.cc b/libitm/method-gl.cc index 87d01dbf1f1..b2e2bcad71e 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() |