summaryrefslogtreecommitdiff
path: root/exception.cc
diff options
context:
space:
mode:
Diffstat (limited to 'exception.cc')
-rw-r--r--exception.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/exception.cc b/exception.cc
index 50ee582ae6f59..c1cb243b105aa 100644
--- a/exception.cc
+++ b/exception.cc
@@ -39,6 +39,24 @@
#pragma weak pthread_setspecific
#pragma weak pthread_getspecific
#pragma weak pthread_once
+#ifdef LIBCXXRT_WEAK_LOCKS
+#pragma weak pthread_mutex_lock
+#define pthread_mutex_lock(mtx) do {\
+ if (pthread_mutex_lock) pthread_mutex_lock(mtx);\
+ } while(0)
+#pragma weak pthread_mutex_unlock
+#define pthread_mutex_unlock(mtx) do {\
+ if (pthread_mutex_unlock) pthread_mutex_unlock(mtx);\
+ } while(0)
+#pragma weak pthread_cond_signal
+#define pthread_cond_signal(cv) do {\
+ if (pthread_cond_signal) pthread_cond_signal(cv);\
+ } while(0)
+#pragma weak pthread_cond_wait
+#define pthread_cond_wait(cv, mtx) do {\
+ if (pthread_cond_wait) pthread_cond_wait(cv, mtx);\
+ } while(0)
+#endif
using namespace ABI_NAMESPACE;
@@ -214,8 +232,6 @@ namespace std
}
-extern "C" std::type_info *__cxa_current_exception_type();
-
/**
* Class of exceptions to distinguish between this and other exception types.
*