summaryrefslogtreecommitdiffstats
path: root/contrib/libcxxrt/exception.cc
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2013-07-10 16:28:24 +0000
committertheraven <theraven@FreeBSD.org>2013-07-10 16:28:24 +0000
commit214e4f8fe625ad54aac3b215909e0b994a5768ec (patch)
treef757844d307e5ebbf92ab857f2376cceb7807147 /contrib/libcxxrt/exception.cc
parentc660176671bf640bee3fd09dbfa32ad187a9b942 (diff)
downloadFreeBSD-src-214e4f8fe625ad54aac3b215909e0b994a5768ec.zip
FreeBSD-src-214e4f8fe625ad54aac3b215909e0b994a5768ec.tar.gz
Import new libcxxrt / libc++. This brings some bug fixes, including a potential race condition for static initialisers.
Diffstat (limited to 'contrib/libcxxrt/exception.cc')
-rw-r--r--contrib/libcxxrt/exception.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc
index 50ee582..c1cb243 100644
--- a/contrib/libcxxrt/exception.cc
+++ b/contrib/libcxxrt/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.
*
OpenPOWER on IntegriCloud