Removed signal_threaded uRCU
[libcds.git] / cds / urcu / details / sh_decl.h
index e3eb92f6c0ee02be2bf640c4a62fbc82405df6b3..0d9371d3ff3d25e77ea38b3e0ad60495a5ffc523 100644 (file)
@@ -1,11 +1,11 @@
 /*
     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:
 
@@ -25,7 +25,7 @@
     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
@@ -51,11 +51,11 @@ namespace cds { namespace urcu { namespace details {
         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
 
@@ -66,7 +66,6 @@ namespace cds { namespace urcu { namespace details {
     };
 #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>
@@ -84,6 +83,7 @@ namespace cds { namespace urcu { namespace details {
     public:
         sh_thread_gc();
         ~sh_thread_gc();
+
     public:
         static void access_lock();
         static void access_unlock();
@@ -98,9 +98,9 @@ namespace cds { namespace urcu { namespace details {
 
         /// 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 );
         }
 
@@ -115,7 +115,6 @@ namespace cds { namespace urcu { namespace details {
 #   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
 
@@ -131,9 +130,9 @@ namespace cds { namespace urcu { namespace details {
         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 )
@@ -220,7 +219,6 @@ namespace cds { namespace urcu { namespace details {
     }
 
     CDS_SIGRCU_DECLARE_SINGLETON( signal_buffered_tag  );
-    CDS_SIGRCU_DECLARE_SINGLETON( signal_threaded_tag );
 
 #   undef CDS_SIGRCU_DECLARE_SINGLETON