summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/Support/Threading.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/Support/Threading.cpp')
-rw-r--r--contrib/llvm/lib/Support/Threading.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm/lib/Support/Threading.cpp b/contrib/llvm/lib/Support/Threading.cpp
index 2957956..b62b1a9 100644
--- a/contrib/llvm/lib/Support/Threading.cpp
+++ b/contrib/llvm/lib/Support/Threading.cpp
@@ -24,7 +24,7 @@ static bool multithreaded_mode = false;
static sys::Mutex* global_lock = 0;
bool llvm::llvm_start_multithreaded() {
-#ifdef LLVM_MULTITHREADED
+#if defined(LLVM_MULTITHREADED) && LLVM_MULTITHREADED == 1
assert(!multithreaded_mode && "Already multithreaded!");
multithreaded_mode = true;
global_lock = new sys::Mutex(true);
@@ -39,7 +39,7 @@ bool llvm::llvm_start_multithreaded() {
}
void llvm::llvm_stop_multithreaded() {
-#ifdef LLVM_MULTITHREADED
+#if defined(LLVM_MULTITHREADED) && LLVM_MULTITHREADED == 1
assert(multithreaded_mode && "Not currently multithreaded!");
// We fence here to insure that all threaded operations are complete BEFORE we
@@ -63,7 +63,7 @@ void llvm::llvm_release_global_lock() {
if (multithreaded_mode) global_lock->release();
}
-#if defined(LLVM_MULTITHREADED) && defined(HAVE_PTHREAD_H)
+#if defined(LLVM_MULTITHREADED) && LLVM_MULTITHREADED == 1 && defined(HAVE_PTHREAD_H)
#include <pthread.h>
struct ThreadInfo {
OpenPOWER on IntegriCloud