[compiler-rt] r192357 - tsan: minor refactoring
Dmitry Vyukov
dvyukov at google.com
Thu Oct 10 09:03:24 PDT 2013
Author: dvyukov
Date: Thu Oct 10 11:03:24 2013
New Revision: 192357
URL: http://llvm.org/viewvc/llvm-project?rev=192357&view=rev
Log:
tsan: minor refactoring
Replace duplicate code snippet with function.
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc?rev=192357&r1=192356&r2=192357&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc Thu Oct 10 11:03:24 2013
@@ -138,12 +138,7 @@ int MutexUnlock(ThreadState *thr, uptr p
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);
}
More information about the llvm-commits
mailing list