projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'dev' of github.com:khizmax/libcds into dev
[libcds.git]
/
cds
/
sync
/
injecting_monitor.h
diff --git
a/cds/sync/injecting_monitor.h
b/cds/sync/injecting_monitor.h
index e1cf5637f8041f711643986751139867dfb1649d..1c81327d52c67843d3a6f4f9eb634735cd176a15 100644
(file)
--- a/
cds/sync/injecting_monitor.h
+++ b/
cds/sync/injecting_monitor.h
@@
-10,9
+10,16
@@
namespace cds { namespace sync {
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
/**
/// @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:
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
/// 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
};
/// Makes exclusive access to node \p p
@@
-43,9
+57,16
@@
namespace cds { namespace sync {
p.m_SyncMonitorInjection.m_Lock.unlock();
}
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>
/// 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
};
}} // namespace cds::sync