11 #ifndef ASIO_DETAIL_POSIX_TSS_PTR_HPP 12 #define ASIO_DETAIL_POSIX_TSS_PTR_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_HAS_PTHREADS) 31 ASIO_DECL void posix_tss_ptr_create(pthread_key_t& key);
41 posix_tss_ptr_create(tss_key_);
47 ::pthread_key_delete(tss_key_);
53 return static_cast<T*
>(::pthread_getspecific(tss_key_));
57 void operator=(T* value)
59 ::pthread_setspecific(tss_key_, value);
65 pthread_key_t tss_key_;
73 #if defined(ASIO_HEADER_ONLY) 75 #endif // defined(ASIO_HEADER_ONLY) 77 #endif // defined(ASIO_HAS_PTHREADS) 79 #endif // ASIO_DETAIL_POSIX_TSS_PTR_HPP