diff options
Diffstat (limited to 'system/include/libcxx/thread')
-rw-r--r-- | system/include/libcxx/thread | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/system/include/libcxx/thread b/system/include/libcxx/thread index 60d88859..8d3aab2a 100644 --- a/system/include/libcxx/thread +++ b/system/include/libcxx/thread @@ -144,9 +144,11 @@ template <class _Tp> __thread_specific_ptr<_Tp>::__thread_specific_ptr() { int __ec = pthread_key_create(&__key_, &__thread_specific_ptr::__at_thread_exit); +#ifndef _LIBCPP_NO_EXCEPTIONS if (__ec) throw system_error(error_code(__ec, system_category()), "__thread_specific_ptr construction failed"); +#endif } template <class _Tp> @@ -173,8 +175,8 @@ __thread_specific_ptr<_Tp>::reset(pointer __p) delete __p_old; } -class _LIBCPP_VISIBLE thread; -class _LIBCPP_VISIBLE __thread_id; +class _LIBCPP_TYPE_VIS thread; +class _LIBCPP_TYPE_VIS __thread_id; namespace this_thread { @@ -183,10 +185,10 @@ _LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT; } // this_thread -class _LIBCPP_VISIBLE __thread_id; -template<> struct _LIBCPP_VISIBLE hash<__thread_id>; +class _LIBCPP_TYPE_VIS __thread_id; +template<> struct _LIBCPP_TYPE_VIS hash<__thread_id>; -class _LIBCPP_VISIBLE __thread_id +class _LIBCPP_TYPE_VIS __thread_id { // FIXME: pthread_t is a pointer on Darwin but a long on Linux. // NULL is the no-thread value on Darwin. Someone needs to check @@ -228,12 +230,12 @@ private: __thread_id(pthread_t __id) : __id_(__id) {} friend __thread_id this_thread::get_id() _NOEXCEPT; - friend class _LIBCPP_VISIBLE thread; - friend struct _LIBCPP_VISIBLE hash<__thread_id>; + friend class _LIBCPP_TYPE_VIS thread; + friend struct _LIBCPP_TYPE_VIS hash<__thread_id>; }; template<> -struct _LIBCPP_VISIBLE hash<__thread_id> +struct _LIBCPP_TYPE_VIS hash<__thread_id> : public unary_function<__thread_id, size_t> { _LIBCPP_INLINE_VISIBILITY @@ -255,7 +257,7 @@ get_id() _NOEXCEPT } // this_thread -class _LIBCPP_VISIBLE thread +class _LIBCPP_TYPE_VIS thread { pthread_t __t_; |