summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc
index 959001ca612..882def83565 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc
@@ -207,4 +207,14 @@ void Release(ThreadState *thr, uptr pc, uptr addr) {
s->mtx.Unlock();
}
+void ReleaseStore(ThreadState *thr, uptr pc, uptr addr) {
+ CHECK_GT(thr->in_rtl, 0);
+ DPrintf("#%d: ReleaseStore %zx\n", thr->tid, addr);
+ SyncVar *s = CTX()->synctab.GetAndLock(thr, pc, addr, true);
+ thr->clock.set(thr->tid, thr->fast_state.epoch());
+ thr->clock.ReleaseStore(&s->clock);
+ StatInc(thr, StatSyncRelease);
+ s->mtx.Unlock();
+}
+
} // namespace __tsan
OpenPOWER on IntegriCloud