summaryrefslogtreecommitdiff
path: root/test/tsan/atomic_free3.cc
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2015-11-06 11:05:53 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2015-11-06 11:05:53 +0000
commitebc821f9271012b54c438438af319da8581b695b (patch)
tree19dcb530c77d0d55864f463b59ff2f6bcd3c3ca7 /test/tsan/atomic_free3.cc
parent1c591077573491e8082cde9c790f935d7a2a3a88 (diff)
[tsan] Replace pthread_yield with sched_yield in lit tests
OS X doesn't have `pthread_yield`. Let's use `sched_yield` instead. Differential Revision: http://reviews.llvm.org/D14428 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tsan/atomic_free3.cc')
-rw-r--r--test/tsan/atomic_free3.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tsan/atomic_free3.cc b/test/tsan/atomic_free3.cc
index 753671bd1..f2875aeb6 100644
--- a/test/tsan/atomic_free3.cc
+++ b/test/tsan/atomic_free3.cc
@@ -13,7 +13,7 @@ int main() {
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);
}