[compiler-rt] 53fc462 - tsan: remove unused variable

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 10:52:37 PST 2021


Author: Dmitry Vyukov
Date: 2021-12-21T19:52:34+01:00
New Revision: 53fc46251321546967127c5ef073718e97cb293d

URL: https://github.com/llvm/llvm-project/commit/53fc46251321546967127c5ef073718e97cb293d
DIFF: https://github.com/llvm/llvm-project/commit/53fc46251321546967127c5ef073718e97cb293d.diff

LOG: tsan: remove unused variable

Depends on D113983.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D113984

Added: 
    

Modified: 
    compiler-rt/lib/tsan/rtl/tsan_rtl.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
index 71ca53c72e97..17fba0c584a1 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
@@ -452,9 +452,7 @@ static void *BackgroundThread(void *arg) {
 
   u64 last_flush = start;
   uptr last_rss = 0;
-  for (int i = 0;
-      atomic_load(&ctx->stop_background_thread, memory_order_relaxed) == 0;
-      i++) {
+  while (!atomic_load_relaxed(&ctx->stop_background_thread)) {
     SleepForMillis(100);
     u64 now = NanoTime();
 


        


More information about the llvm-commits mailing list