summaryrefslogtreecommitdiff
path: root/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
commitc285efad792f81f323c18e7f7674164ad94b4059 (patch)
tree2bf957338933bedfc220172a30a30ac8e65958d3 /src/cxa_exception.cpp
parent5db9aa48b796e95cf61ac02d31fd7a0c13a98bea (diff)
On single threaded systems, turn mutexes into nops
http://reviews.llvm.org/D3386 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@208135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_exception.cpp')
-rw-r--r--src/cxa_exception.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cxa_exception.cpp b/src/cxa_exception.cpp
index 64040fd..9bc6ad6 100644
--- a/src/cxa_exception.cpp
+++ b/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"