summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-05-13 12:02:53 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-05-13 12:02:53 +0000
commite5e92fac4a59c5786fdd0fcd32dbf2f4cde529e0 (patch)
tree3f32924371f1fa70331649c34555163e28cccf61 /compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
parentf2526a56feeb3450ca4fd828c7ff2535b6f168be (diff)
downloadbcm5719-llvm-e5e92fac4a59c5786fdd0fcd32dbf2f4cde529e0.tar.gz
bcm5719-llvm-e5e92fac4a59c5786fdd0fcd32dbf2f4cde529e0.zip
[Sanitizer tests] Fix most of the build problems on Windows
E.g. use the pthread helpers introduced in r208674 llvm-svn: 208692
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
index 69b6e13e721..b6a60d5e7b9 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
@@ -11,6 +11,9 @@
//
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_thread_registry.h"
+
+#include "sanitizer_pthread_wrappers.h"
+
#include "gtest/gtest.h"
#include <vector>
@@ -203,10 +206,10 @@ static void ThreadedTestRegistry(ThreadRegistry *registry) {
for (int i = 0; i < kNumShards; i++) {
args[i].registry = registry;
args[i].shard = i + 1;
- pthread_create(&threads[i], 0, RunThread, &args[i]);
+ PTHREAD_CREATE(&threads[i], 0, RunThread, &args[i]);
}
for (int i = 0; i < kNumShards; i++) {
- pthread_join(threads[i], 0);
+ PTHREAD_JOIN(threads[i], 0);
}
// Check that each thread created/started/joined correct amount
// of "threads" in thread_registry.
OpenPOWER on IntegriCloud