tsan: removing redundant loop in ThreadClock::release()

The removed loop clears reused for entries at the tail of a SyncClock.
The loop is redundant since those entries were already cleared by the
immediately preceding loop, which iterates over all entries in the
SyncClock (including the tail entries).
This commit is contained in:
Daniel Fava 2020-02-19 17:09:18 +01:00 committed by Dmitry Vyukov
parent d97d409277
commit 9b91bcf6c6
1 changed files with 0 additions and 2 deletions

View File

@ -222,8 +222,6 @@ void ThreadClock::release(ClockCache *c, SyncClock *dst) {
// Clear 'acquired' flag in the remaining elements.
if (nclk_ < dst->size_)
CPP_STAT_INC(StatClockReleaseClearTail);
for (uptr i = nclk_; i < dst->size_; i++)
dst->elem(i).reused = 0;
dst->release_store_tid_ = kInvalidTid;
dst->release_store_reused_ = 0;
// If we've acquired dst, remember this fact,