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:
/// 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
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