Fixed files encoding (#46)
[libcds.git] / cds / urcu / general_instant.h
index c0c128cdb5b2d1805d6f93919c3be52fd85598a9..77ffe3bce6eb77e3410a7cc54c3cdcd9754b0bf0 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
-#ifndef _CDS_URCU_GENERAL_INSTANT_H
-#define _CDS_URCU_GENERAL_INSTANT_H
+#ifndef CDSLIB_URCU_GENERAL_INSTANT_H
+#define CDSLIB_URCU_GENERAL_INSTANT_H
 
 #include <cds/urcu/details/gpi.h>
 
@@ -10,11 +10,11 @@ namespace cds { namespace urcu {
     /// User-space general-purpose RCU with immediate reclamation
     /** @anchor cds_urcu_general_instant_gc
 
-        This is a wrapper around general_instant class used for metaprogramming.
+        This is a wrapper around \p general_instant class.
 
         Template arguments:
         - \p Lock - mutex type, default is \p std::mutex
-        - \p Backoff - back-off schema, default is cds::backoff::Default
+        - \p Backoff - back-off schema, default is \p cds::backoff::Default
     */
     template <
 #ifdef CDS_DOXGEN_INVOKED
@@ -96,6 +96,13 @@ namespace cds { namespace urcu {
             rcu_implementation::instance()->batch_retire( itFirst, itLast );
         }
 
+        /// Retires the pointer chain until \p Func returns \p nullptr retired pointer
+        template <typename Func>
+        static void batch_retire( Func e )
+        {
+            rcu_implementation::instance()->batch_retire( e );
+        }
+
         /// Acquires access lock (so called RCU reader-side lock)
         /**
             For safety reasons, it is better to use \ref scoped_lock class for locking/unlocking
@@ -135,4 +142,4 @@ namespace cds { namespace urcu {
 
 }} // namespace cds::urcu
 
-#endif // #ifndef _CDS_URCU_GENERAL_INSTANT_H
+#endif // #ifndef CDSLIB_URCU_GENERAL_INSTANT_H