From: khizmax Date: Tue, 10 Mar 2015 06:07:10 +0000 (+0300) Subject: Formatting issues X-Git-Tag: v2.1.0~305^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fdce31dffd9a2001e781b32c251bd3f942a7a906;p=libcds.git Formatting issues --- diff --git a/cds/sync/monitor.h b/cds/sync/monitor.h index 09eb1970..2ac85a33 100644 --- a/cds/sync/monitor.h +++ b/cds/sync/monitor.h @@ -1,7 +1,10 @@ //$$CDS-header$$ + #ifndef CDSLIB_SYNC_MONITOR_H #define CDSLIB_SYNC_MONITOR_H + #include + namespace cds { namespace sync { /** @page cds_sync_monitor Synchronization monitor @@ -16,7 +19,9 @@ namespace cds { namespace sync { lock object for the node if needed, and to lock the node. The monitor strategy can significantly reduce the number of system objects required for data structure. + Implemetations + \p libcds contains several monitor implementations: - \p sync::injecting_monitor injects the lock object into each node. That mock monitor is designed for user-space locking primitive like @@ -25,11 +30,14 @@ namespace cds { namespace sync { for a node from the pool when needed. When the node is unlocked the lock assigned to it is given back to the pool if no thread references to that node. + How to use + If you use a container from \p libcds that requires a monitor, you should just specify required monitor type in container's traits. Usually, the monitor is specified by \p traits::sync_monitor typedef, or by \p cds::opt::sync_monitor option for container's \p make_traits metafunction. + If you're developing a new container algorithm, you should know internal monitor interface: \code