@@ -230,8 +230,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static_cast<long>(__ns.count())
};
- auto __mutex = static_cast<_Derived*>(this)->native_handle();
- return !__gthread_mutex_timedlock(__mutex, &__ts);
+ return !static_cast<_Derived*>(this)->__timedlock(&__ts);
}
template<typename _Clock, typename _Duration>
@@ -293,6 +292,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
native_handle_type
native_handle()
{ return &_M_mutex; }
+
+ private:
+ friend class __timed_mutex_impl;
+
+ int
+ __timedlock(const __gthread_time_t *__abs_timeout)
+ { return __gthread_mutex_timedlock(&_M_mutex, __abs_timeout); }
};
/// recursive_timed_mutex
@@ -346,6 +352,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
native_handle_type
native_handle()
{ return &_M_mutex; }
+
+ private:
+ friend class __timed_mutex_impl;
+
+ int
+ __timedlock(const __gthread_time_t *__abs_timeout)
+ { return __gthread_recursive_mutex_timedlock(&_M_mutex, __abs_timeout); }
};
#endif
#endif // _GLIBCXX_HAS_GTHREADS