Merge branch 'dev' of github.com:khizmax/libcds into dev
[libcds.git] / cds / sync / injecting_monitor.h
index e1cf5637f8041f711643986751139867dfb1649d..1c81327d52c67843d3a6f4f9eb634735cd176a15 100644 (file)
 
 namespace cds { namespace sync {
 
+    //@cond
+    struct injecting_monitor_traits {
+        struct empty_stat
+        {};
+    };
+    //@endcond
+
     /// @ref cds_sync_monitor "Monitor" that injects the lock into each node
     /**
-        This simple monitor injects the lock object of type \p Lock into each node. 
+        This simple monitor injects the lock object of type \p Lock into each node.
         The monitor is designed for user-space locking primitives like \ref sync::spin_lock "spin-lock".
 
         Template arguments:
@@ -27,6 +34,13 @@ namespace cds { namespace sync {
         /// Node injection
         struct node_injection {
             mutable lock_type m_Lock;   ///< Node spin-lock
+
+            //@cond
+            CDS_CONSTEXPR bool check_free() const
+            {
+                return true;
+            }
+            //@endcond
         };
 
         /// Makes exclusive access to node \p p
@@ -43,9 +57,16 @@ namespace cds { namespace sync {
             p.m_SyncMonitorInjection.m_Lock.unlock();
         }
 
+        //@cond
+        injecting_monitor_traits::empty_stat statistics() const
+        {
+            return injecting_monitor_traits::empty_stat();
+        }
+        //@endcond
+
         /// Scoped lock
         template <typename Node>
-        using scoped_lock = monitor_scoped_lock< injecting_monitor, Node > ;
+        using scoped_lock = monitor_scoped_lock< injecting_monitor, Node >;
     };
 }} // namespace cds::sync