Skip to content

Commit

Permalink
correct precise race detector annotations in phase-fair reader-writer…
Browse files Browse the repository at this point in the history
… lock
  • Loading branch information
John Mellor-Crummey committed Jan 8, 2018
1 parent 43dd5eb commit cfa7543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/src/pfq-rwlock.C
Expand Up @@ -80,7 +80,7 @@ pfq_rwlock_init(pfq_rwlock_t &l)
void
pfq_rwlock_read_lock(pfq_rwlock_t &l)
{
race_detector_fake_lock_acquire(&l);
race_detector_fake_lock_acquire(&l.wtail);
uint32_t ticket = atomic_fetch_add_explicit(&l.rin, READER_INCREMENT, std::memory_order_acq_rel);

if (ticket & WRITER_PRESENT) {
Expand All @@ -102,7 +102,7 @@ pfq_rwlock_read_unlock(pfq_rwlock_t &l)
if (ticket == atomic_load_explicit(&l.last, std::memory_order_acquire))
atomic_store_explicit(&l.whead->blocked, false, std::memory_order_release);
}
race_detector_fake_lock_release(&l);
race_detector_fake_lock_release(&l.wtail);
}


Expand Down

0 comments on commit cfa7543

Please sign in to comment.