Fixed files encoding (#46)
[libcds.git] / cds / urcu / details / base.h
index 8aa281072d38ca38015d9ee0d030f21f5d7cf518..7a81b8635dfca4436eebcf9622798922e1a368f7 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
-#ifndef _CDS_URCU_DETAILS_BASE_H
-#define _CDS_URCU_DETAILS_BASE_H
+#ifndef CDSLIB_URCU_DETAILS_BASE_H
+#define CDSLIB_URCU_DETAILS_BASE_H
 
 #include <cds/algo/atomic.h>
 #include <cds/gc/details/retired_ptr.h>
@@ -75,7 +75,7 @@ namespace cds {
           the best possible read-side performance, but requires that each thread periodically
           calls a function to announce that it is in a quiescent state, thus strongly
           constraining the application design. This type of %RCU is not implemented in \p libcds.
-        - The general-purpose %RCU implementation places almost no constraints on the application\92s
+        - The general-purpose %RCU implementation places almost no constraints on the application's
           design, thus being appropriate for use within a general-purpose library, but it has
           relatively higher read-side overhead. The \p libcds contains several implementations of general-purpose
           %RCU: \ref general_instant, \ref general_buffered, \ref general_threaded.
@@ -255,6 +255,7 @@ namespace cds {
 
         ///@anchor cds_urcu_retired_ptr Retired pointer, i.e. pointer that ready for reclamation
         typedef cds::gc::details::retired_ptr   retired_ptr;
+        using cds::gc::make_retired_ptr;
 
         /// Pointer to function to free (destruct and deallocate) retired pointer of specific type
         typedef cds::gc::details::free_retired_ptr_func free_retired_ptr_func;
@@ -407,19 +408,15 @@ namespace cds {
                 typedef ThreadGC                    thread_gc;
                 typedef typename thread_gc::rcu_tag rcu_tag;
 
-                bool m_bLocked;
             public:
-                scoped_lock(bool bLock = true)
-                    : m_bLocked( bLock )
+                scoped_lock()
                 {
-                    if ( bLock )
-                        thread_gc::access_lock();
+                    thread_gc::access_lock();
                 }
 
                 ~scoped_lock()
                 {
-                    if ( m_bLocked )
-                        thread_gc::access_unlock();
+                    thread_gc::access_unlock();
                 }
             };
             //@endcond
@@ -455,4 +452,4 @@ namespace cds {
     } // namespace urcu
 } // namespace cds
 
-#endif // #ifndef _CDS_URCU_DETAILS_BASE_H
+#endif // #ifndef CDSLIB_URCU_DETAILS_BASE_H