[PATCH] D14428: [tsan] Replace pthread_yield with sched_yield in lit tests
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 03:08:23 PST 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL252283: [tsan] Replace pthread_yield with sched_yield in lit tests (authored by kuba.brecka).
Changed prior to commit:
http://reviews.llvm.org/D14428?vs=39496&id=39505#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14428
Files:
compiler-rt/trunk/test/tsan/atomic_free3.cc
compiler-rt/trunk/test/tsan/real_deadlock_detector_stress_test.cc
compiler-rt/trunk/test/tsan/signal_errno.cc
Index: compiler-rt/trunk/test/tsan/atomic_free3.cc
===================================================================
--- compiler-rt/trunk/test/tsan/atomic_free3.cc
+++ compiler-rt/trunk/test/tsan/atomic_free3.cc
@@ -13,7 +13,7 @@
pthread_t t;
pthread_create(&t, 0, Thread, a);
while (__atomic_load_n(a, __ATOMIC_RELAXED) == 0)
- pthread_yield();
+ sched_yield();
delete a;
pthread_join(t, 0);
}
Index: compiler-rt/trunk/test/tsan/signal_errno.cc
===================================================================
--- compiler-rt/trunk/test/tsan/signal_errno.cc
+++ compiler-rt/trunk/test/tsan/signal_errno.cc
@@ -24,7 +24,7 @@
volatile char *p = (char*)malloc(1);
p[0] = 0;
free((void*)p);
- pthread_yield();
+ sched_yield();
}
}
Index: compiler-rt/trunk/test/tsan/real_deadlock_detector_stress_test.cc
===================================================================
--- compiler-rt/trunk/test/tsan/real_deadlock_detector_stress_test.cc
+++ compiler-rt/trunk/test/tsan/real_deadlock_detector_stress_test.cc
@@ -59,7 +59,7 @@
for (;;) {
int old = __atomic_load_n(&m->state, __ATOMIC_RELAXED);
if (old == kStateLocked) {
- pthread_yield();
+ sched_yield();
continue;
}
int newv = old + 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14428.39505.patch
Type: text/x-patch
Size: 1316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151106/2d9f7a1c/attachment.bin>
More information about the llvm-commits
mailing list