forked from OSchip/llvm-project
tsan: minor refactoring
Replace duplicate code snippet with function. llvm-svn: 192357
This commit is contained in:
parent
72ace5cf12
commit
3431b38067
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue