diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-10-10 16:03:24 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-10-10 16:03:24 +0000 |
commit | 117699dc17e35e84ea1179428a245ff6b60aa98f (patch) | |
tree | 481b2e6d3f5d6f7d9efff9fa416a76e26fe90ade /lib/tsan/rtl/tsan_rtl_mutex.cc | |
parent | e1ddbf9a458e81125a03fea721997565124294ae (diff) | |
download | compiler-rt-117699dc17e35e84ea1179428a245ff6b60aa98f.tar.gz compiler-rt-117699dc17e35e84ea1179428a245ff6b60aa98f.tar.bz2 compiler-rt-117699dc17e35e84ea1179428a245ff6b60aa98f.tar.xz |
tsan: minor refactoring
Replace duplicate code snippet with function.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl_mutex.cc')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl_mutex.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/tsan/rtl/tsan_rtl_mutex.cc b/lib/tsan/rtl/tsan_rtl_mutex.cc index 98f32c2a..e9eb81ac 100644 --- a/lib/tsan/rtl/tsan_rtl_mutex.cc +++ b/lib/tsan/rtl/tsan_rtl_mutex.cc @@ -138,12 +138,7 @@ int MutexUnlock(ThreadState *thr, uptr pc, uptr addr, bool all) { if (s->recursion == 0) { StatInc(thr, StatMutexUnlock); s->owner_tid = SyncVar::kInvalidTid; - if (thr->ignore_sync == 0) { - thr->clock.set(thr->tid, thr->fast_state.epoch()); - thr->fast_synch_epoch = thr->fast_state.epoch(); - thr->clock.ReleaseStore(&s->clock); - StatInc(thr, StatSyncRelease); - } + ReleaseStoreImpl(thr, pc, &s->clock); } else { StatInc(thr, StatMutexRecUnlock); } |