summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_exception.cpp
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2014-05-06 21:30:56 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2014-05-06 21:30:56 +0000
commit40e9842854430ff34b0b687cbb94e9f4a044588a (patch)
tree6f9cfaa242398ebcd758477ff08448196d64ebaf /libcxxabi/src/cxa_exception.cpp
parent9c928478f48384ad641a3c895856fbcef0c34f22 (diff)
downloadbcm5719-llvm-40e9842854430ff34b0b687cbb94e9f4a044588a.tar.gz
bcm5719-llvm-40e9842854430ff34b0b687cbb94e9f4a044588a.zip
On single threaded systems, turn mutexes into nops
http://reviews.llvm.org/D3386 llvm-svn: 208135
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 64040fd6885..9bc6ad6fd04 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -11,13 +11,15 @@
//
//===----------------------------------------------------------------------===//
+#include "config.h"
#include "cxxabi.h"
#include <exception> // for std::terminate
#include <cstdlib> // for malloc, free
#include <cstring> // for memset
-#include <pthread.h>
-
+#if !LIBCXXABI_SINGLE_THREADED
+# include <pthread.h> // for fallback_malloc.ipp's mutexes
+#endif
#include "cxa_exception.hpp"
#include "cxa_handlers.hpp"
OpenPOWER on IntegriCloud