aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/std/thread11
1 files changed, 11 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index efcb101..0576347 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -132,9 +132,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
explicit
thread(_Callable&& __f, _Args&&... __args)
{
+#ifdef GTHR_ACTIVE_PROXY
+ // Create a reference to pthread_create, not just the gthr weak symbol
+ _M_start_thread(_M_make_routine(std::__bind_simple(
+ std::forward<_Callable>(__f),
+ std::forward<_Args>(__args)...)),
+ reinterpret_cast<void(*)()>(&pthread_create));
+#else
_M_start_thread(_M_make_routine(std::__bind_simple(
std::forward<_Callable>(__f),
std::forward<_Args>(__args)...)));
+#endif
}
~thread()
@@ -183,6 +191,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
void
+ _M_start_thread(__shared_base_type, void (*)());
+
+ void
_M_start_thread(__shared_base_type);
template<typename _Callable>