[all-commits] [llvm/llvm-project] 180d21: tsan: Adding releaseAcquire() to ThreadClock

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Tue Mar 24 03:28:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 180d211770a0a1f82d483433fab007cd4d14cbd9
      https://github.com/llvm/llvm-project/commit/180d211770a0a1f82d483433fab007cd4d14cbd9
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2020-03-24 (Tue, 24 Mar 2020)

  Changed paths:
    M compiler-rt/lib/tsan/go/test.c
    M compiler-rt/lib/tsan/go/tsan_go.cpp
    M compiler-rt/lib/tsan/rtl/tsan_clock.cpp
    M compiler-rt/lib/tsan/rtl/tsan_clock.h
    M compiler-rt/lib/tsan/rtl/tsan_rtl.h
    M compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
    M compiler-rt/lib/tsan/rtl/tsan_stat.h

  Log Message:
  -----------
  tsan: Adding releaseAcquire() to ThreadClock

realeaseAcquire() is a new function added to TSan in support of the Go data-race detector.
It's semantics is:

void ThreadClock::releaseAcquire(SyncClock *sc) const {
  for (int i = 0; i < kMaxThreads; i++) {
    tmp = clock[i];
    clock[i] = max(clock[i], sc->clock[i]);
    sc->clock[i] = tmp;
  }
}

For context see: https://go-review.googlesource.com/c/go/+/220419

Reviewed-in: https://reviews.llvm.org/D76322
Author: dfava (Daniel Fava)




More information about the All-commits mailing list