Removing cds/refcounter.h
authorkhizmax <libcds.dev@gmail.com>
Sat, 29 Nov 2014 12:18:14 +0000 (15:18 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sat, 29 Nov 2014 12:18:14 +0000 (15:18 +0300)
.gitignore
cds/refcounter.h [deleted file]
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
projects/Win/vc14/cds.vcxproj
projects/Win/vc14/cds.vcxproj.filters

index 0fb3168..e67a164 100644 (file)
@@ -14,3 +14,4 @@ obj
 /projects/Win/vc14/cds.sdf
 /projects/Win/vc14/cds.v14.suo
 /projects/Win/vc14/cds.vcxproj.user
+/projects/Win/vc14/*.opensdf
diff --git a/cds/refcounter.h b/cds/refcounter.h
deleted file mode 100644 (file)
index 69ca30a..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-//$$CDS-header$$
-
-#ifndef __CDS_REFCOUNTER_H
-#define __CDS_REFCOUNTER_H
-
-/*
-    Refernce counting primitives
-
-    Editions:
-*/
-
-#include <cds/algo/atomic.h>
-
-namespace cds {
-
-    /// Simple reference counter
-    /**
-        Thread-safe reference counter build on atomic primitives.
-        \p T is one of integer types
-    */
-    template <typename T>
-    class ref_counter
-    {
-        atomics::atomic<T>   m_nRefCount    ;        ///< The reference counter
-
-    public:
-        typedef T   ref_counter_type  ; ///< The reference counter type
-
-    public:
-        /// Construct reference counter with specified value \p initValue
-        ref_counter( T initValue = 0 ) CDS_NOEXCEPT
-            : m_nRefCount(initValue)
-        {}
-
-        /// Get current value of reference counter.
-        T   value() const CDS_NOEXCEPT
-        {
-            return m_nRefCount.load( atomics::memory_order_relaxed );
-        }
-
-        /// Current value of reference counter
-        operator T() const CDS_NOEXCEPT
-        {
-            return value();
-        }
-
-        /// Atomic increment
-        void    inc() CDS_NOEXCEPT
-        {
-            m_nRefCount.fetch_add( 1, atomics::memory_order_relaxed );
-        }
-
-        /// Atomic decrement. Return \p true if reference counter is 0, otherwise \p false
-        bool    dec() CDS_NOEXCEPT
-        {
-            if ( m_nRefCount.fetch_sub( 1, atomics::memory_order_relaxed ) == 1 ) {
-                atomics::atomic_thread_fence( atomics::memory_order_release );
-                return true;
-            }
-            return false;
-        }
-
-        /// Atomic increment
-        void operator ++() CDS_NOEXCEPT
-        {
-            inc();
-        }
-
-        /// Atomic decrement
-        bool operator--() CDS_NOEXCEPT
-        {
-            return dec();
-        }
-    };
-
-    /// Signed 32bit reference counter
-    typedef ref_counter<int32_t>       signed_ref_counter;
-
-    /// Unsigned 32bit reference counter
-    typedef ref_counter<uint32_t>      unsigned_ref_counter;
-
-} // namespace cds
-
-#endif    // #ifndef __CDS_REFCOUNTER_H
index 36061e7..3dd82f6 100644 (file)
     <ClInclude Include="..\..\..\cds\urcu\signal_buffered.h" />\r
     <ClInclude Include="..\..\..\cds\urcu\signal_threaded.h" />\r
     <ClInclude Include="..\..\..\cds\init.h" />\r
-    <ClInclude Include="..\..\..\cds\refcounter.h" />\r
     <ClInclude Include="..\..\..\cds\version.h" />\r
     <ClInclude Include="..\..\..\cds\details\aligned_allocator.h" />\r
     <ClInclude Include="..\..\..\cds\details\aligned_type.h" />\r
index e2373d1..6b52bf2 100644 (file)
     <ClInclude Include="..\..\..\cds\init.h">\r
       <Filter>Header Files\cds</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\refcounter.h">\r
-      <Filter>Header Files\cds</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\version.h">\r
       <Filter>Header Files\cds</Filter>\r
     </ClInclude>\r
index 4cfec11..73226d9 100644 (file)
     <ClInclude Include="..\..\..\cds\urcu\signal_buffered.h" />\r
     <ClInclude Include="..\..\..\cds\urcu\signal_threaded.h" />\r
     <ClInclude Include="..\..\..\cds\init.h" />\r
-    <ClInclude Include="..\..\..\cds\refcounter.h" />\r
     <ClInclude Include="..\..\..\cds\version.h" />\r
     <ClInclude Include="..\..\..\cds\details\aligned_allocator.h" />\r
     <ClInclude Include="..\..\..\cds\details\aligned_type.h" />\r
index e2373d1..6b52bf2 100644 (file)
     <ClInclude Include="..\..\..\cds\init.h">\r
       <Filter>Header Files\cds</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\refcounter.h">\r
-      <Filter>Header Files\cds</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\version.h">\r
       <Filter>Header Files\cds</Filter>\r
     </ClInclude>\r