//$$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>
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.
///@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;
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
} // namespace urcu
} // namespace cds
-#endif // #ifndef _CDS_URCU_DETAILS_BASE_H
+#endif // #ifndef CDSLIB_URCU_DETAILS_BASE_H