aboutsummaryrefslogtreecommitdiff
path: root/unittests/Support/ManagedStatic.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-11-24 09:08:18 +0000
commit5ca98fd98791947eba83a1ed3f2c8191ef7afa6c (patch)
treef5944309621cee4fe0976be6f9ac619b7ebfc4c2 /unittests/Support/ManagedStatic.cpp
parent68bcb7db193e4bc81430063148253d30a791023e (diff)
Diffstat (limited to 'unittests/Support/ManagedStatic.cpp')
-rw-r--r--unittests/Support/ManagedStatic.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/unittests/Support/ManagedStatic.cpp b/unittests/Support/ManagedStatic.cpp
index 1497f4e34082..153884ba4298 100644
--- a/unittests/Support/ManagedStatic.cpp
+++ b/unittests/Support/ManagedStatic.cpp
@@ -25,7 +25,7 @@ namespace test1 {
llvm::ManagedStatic<int> ms;
void *helper(void*) {
*ms;
- return NULL;
+ return nullptr;
}
// Valgrind's leak checker complains glibc's stack allocation.
@@ -47,15 +47,13 @@ TEST(Initialize, MultipleThreads) {
void *p1 = test1::allocate_stack(a1);
void *p2 = test1::allocate_stack(a2);
- llvm_start_multithreaded();
pthread_t t1, t2;
- pthread_create(&t1, &a1, test1::helper, NULL);
- pthread_create(&t2, &a2, test1::helper, NULL);
- pthread_join(t1, NULL);
- pthread_join(t2, NULL);
+ pthread_create(&t1, &a1, test1::helper, nullptr);
+ pthread_create(&t2, &a2, test1::helper, nullptr);
+ pthread_join(t1, nullptr);
+ pthread_join(t2, nullptr);
free(p1);
free(p2);
- llvm_stop_multithreaded();
}
#endif