/*
This file is a part of libcds - Concurrent Data Structures library
- (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_URCU_DETAILS_SH_DECL_H
atomics::atomic<bool> m_bNeedMemBar ; \
thread_list_record< thread_data > m_list ; \
thread_data(): m_nAccessControl(0), m_bNeedMemBar(false) {} \
+ explicit thread_data( OS::ThreadId owner ): m_nAccessControl(0), m_bNeedMemBar(false), m_list(owner) {} \
~thread_data() {} \
}
CDS_SHURCU_DECLARE_THREAD_DATA( signal_buffered_tag );
- CDS_SHURCU_DECLARE_THREAD_DATA( signal_threaded_tag );
# undef CDS_SHURCU_DECLARE_THREAD_DATA
};
#if CDS_COMPILER != CDS_COMPILER_MSVC
template<> CDS_EXPORT_API singleton_vtbl * sh_singleton_instance< signal_buffered_tag >::s_pRCU;
- template<> CDS_EXPORT_API singleton_vtbl * sh_singleton_instance< signal_threaded_tag >::s_pRCU;
#endif
template <typename SigRCUtag>
public:
sh_thread_gc();
~sh_thread_gc();
+
public:
static void access_lock();
static void access_unlock();
/// Retire pointer \p by the disposer \p pFunc
template <typename T>
- static void retire( T * p, void (* pFunc)(T *) )
+ static void retire( T * p, void (* pFunc)(T *))
{
- retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+ retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
retire( rp );
}
# define CDS_SH_RCU_DECLARE_THREAD_GC( tag_ ) template <> class thread_gc<tag_>: public sh_thread_gc<tag_> {}
CDS_SH_RCU_DECLARE_THREAD_GC( signal_buffered_tag );
- CDS_SH_RCU_DECLARE_THREAD_GC( signal_threaded_tag );
# undef CDS_SH_RCU_DECLARE_THREAD_GC
typedef sh_singleton_instance< rcu_tag > rcu_instance;
protected:
- atomics::atomic<uint32_t> m_nGlobalControl;
- thread_list< rcu_tag > m_ThreadList;
- int const m_nSigNo;
+ atomics::atomic<uint32_t> m_nGlobalControl;
+ thread_list< rcu_tag > m_ThreadList;
+ int const m_nSigNo;
protected:
sh_singleton( int nSignal )
}
CDS_SIGRCU_DECLARE_SINGLETON( signal_buffered_tag );
- CDS_SIGRCU_DECLARE_SINGLETON( signal_threaded_tag );
# undef CDS_SIGRCU_DECLARE_SINGLETON