To enable it use \p lazy_list::stat
- \p opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro.
- \p opt::memory_model - C++ memory ordering model. Can be \p opt::v::relaxed_ordering (relaxed memory model, the default)
- or \p opt::v::sequential_consistent (sequentially consisnent memory model).
+ or \p opt::v::sequential_consistent (sequentially consistent memory model).
*/
template <typename... Options>
struct make_traits {
// Tag for selecting lazy list implementation
/**
- This struct is empty and it is used only as a tag for selecting LazyList
+ This empty struct is used only as a tag for selecting \p LazyList
as ordered list implementation in declaration of some classes.
See \p split_list::traits::ordered_list as an example.
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_IMPL_LAZY_KVLIST_H
typedef typename base_class::item_counter item_counter; ///< Item counter type
typedef typename maker::key_comparator key_comparator; ///< key comparing functor
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See \p cds::opt::memory_model
+ typedef typename base_class::stat stat; ///< Internal statistics
static CDS_CONSTEXPR const size_t c_nHazardPtrCount = base_class::c_nHazardPtrCount; ///< Count of hazard pointer required for the algorithm
LazyKVList()
{}
+ //@cond
+ template <typename Stat, typename = std::enable_if<std::is_same<stat, lazy_list::wrapped_stat<Stat>>::value >>
+ explicit LazyKVList( Stat& st )
+ : base_class( st )
+ {}
+ //@endcond
+
/// Destructor clears the list
~LazyKVList()
{
return base_class::size();
}
+ /// Returns const reference to internal statistics
+ stat const& statistics() const
+ {
+ return base_class::statistics();
+ }
+
/// Clears the list
void clear()
{
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_IMPL_LAZY_LIST_H
typedef typename base_class::item_counter item_counter; ///< Item counting policy used
typedef typename maker::key_comparator key_comparator; ///< key comparison functor
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::stat stat; ///< Internal statistics
static CDS_CONSTEXPR const size_t c_nHazardPtrCount = base_class::c_nHazardPtrCount; ///< Count of hazard pointer required for the algorithm
LazyList()
{}
+ //@cond
+ template <typename Stat, typename = std::enable_if<std::is_same<stat, lazy_list::wrapped_stat<Stat>>::value >>
+ explicit LazyList( Stat& st )
+ : base_class( st )
+ {}
+ //@endcond
+
/// Destructor clears the list
~LazyList()
{
return base_class::size();
}
+ /// Returns const reference to internal statistics
+ stat const& statistics() const
+ {
+ return base_class::statistics();
+ }
+
/// Clears the list
void clear()
{
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_LAZY_KVLIST_NOGC_H
typedef typename base_class::item_counter item_counter; ///< Item counting policy used
typedef typename maker::key_comparator key_comparator; ///< key comparison functor
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::stat stat; ///< Internal statistics
static CDS_CONSTEXPR bool const c_bSort = base_class::c_bSort; ///< List type: ordered (\p true) or unordered (\p false)
protected:
LazyKVList()
{}
+ //@cond
+ template <typename Stat, typename = std::enable_if<std::is_same<stat, lazy_list::wrapped_stat<Stat>>::value >>
+ explicit LazyKVList( Stat& st )
+ : base_class( st )
+ {}
+ //@endcond
+
/// Desctructor clears the list
~LazyKVList()
{
return base_class::size();
}
+ /// Returns const reference to internal statistics
+ stat const& statistics() const
+ {
+ return base_class::statistics();
+ }
+
/// Clears the list
/**
Post-condition: the list is empty
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_LAZY_KVLIST_RCU_H
typedef typename base_class::item_counter item_counter; ///< Item counting policy used
typedef typename maker::key_comparator key_comparator; ///< key comparison functor
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::stat stat; ///< Internal statistics
typedef typename base_class::rcu_check_deadlock rcu_check_deadlock ; ///< RCU deadlock checking policy
typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock
LazyKVList()
{}
+ //@cond
+ template <typename Stat, typename = std::enable_if<std::is_same<stat, lazy_list::wrapped_stat<Stat>>::value >>
+ explicit LazyKVList( Stat& st )
+ : base_class( st )
+ {}
+ //@endcond
+
/// Destructor clears the list
~LazyKVList()
{
return base_class::size();
}
+ /// Returns const reference to internal statistics
+ stat const& statistics() const
+ {
+ return base_class::statistics();
+ }
+
/// Clears the list
void clear()
{
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_LAZY_LIST_NOGC_H
typedef T value_type; ///< Type of value stored in the list
typedef Traits traits; ///< List traits
- typedef typename base_class::back_off back_off; ///< Back-off strategy used
- typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes
- typedef typename base_class::item_counter item_counter; ///< Item counting policy used
- typedef typename maker::key_comparator key_comparator; ///< key comparing functor
- typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::back_off back_off; ///< Back-off strategy used
+ typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes
+ typedef typename base_class::item_counter item_counter; ///< Item counting policy used
+ typedef typename maker::key_comparator key_comparator; ///< key comparing functor
+ typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::stat stat; ///< Internal statistics
+
static CDS_CONSTEXPR bool const c_bSort = base_class::c_bSort; ///< List type: ordered (\p true) or unordered (\p false)
protected:
LazyList()
{}
+ //@cond
+ template <typename Stat, typename = std::enable_if<std::is_same<stat, lazy_list::wrapped_stat<Stat>>::value >>
+ explicit LazyList( Stat& st )
+ : base_class( st )
+ {}
+ //@endcond
+
/// Desctructor clears the list
~LazyList()
{
return base_class::size();
}
+ /// Returns const reference to internal statistics
+ stat const& statistics() const
+ {
+ return base_class::statistics();
+ }
+
/// Clears the list
void clear()
{
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_CONTAINER_LAZY_LIST_RCU_H
typedef T value_type; ///< Type of value stored in the list
typedef Traits traits; ///< List traits
- typedef typename base_class::back_off back_off; ///< Back-off strategy
- typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes
- typedef typename base_class::item_counter item_counter; ///< Item counting policy used
- typedef typename maker::key_comparator key_comparator; ///< key compare functor
- typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::back_off back_off; ///< Back-off strategy
+ typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes
+ typedef typename base_class::item_counter item_counter; ///< Item counting policy used
+ typedef typename maker::key_comparator key_comparator; ///< key compare functor
+ typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
+ typedef typename base_class::stat stat; ///< Internal statistics
typedef typename base_class::rcu_check_deadlock rcu_check_deadlock; ///< Deadlock checking policy
typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock
LazyList()
{}
+ //@cond
+ template <typename Stat, typename = std::enable_if<std::is_same<stat, lazy_list::wrapped_stat<Stat>>::value >>
+ explicit LazyList( Stat& st )
+ : base_class( st )
+ {}
+ //@endcond
+
/// Desctructor clears the list
~LazyList()
{
return base_class::size();
}
+ /// Returns const reference to internal statistics
+ stat const& statistics() const
+ {
+ return base_class::statistics();
+ }
+
/// Clears the list
void clear()
{
test_hp( l );
}
+ TEST_F( LazyKVList_DHP, stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyKVList<gc_type, key_type, value_type, traits > list_type;
+
+ list_type l;
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
+ TEST_F( LazyKVList_DHP, wrapped_stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyKVList<gc_type, key_type, value_type, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
} // namespace
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test_kv_list_hp.h"
test_hp( l );
}
+ TEST_F( LazyKVList_HP, stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyKVList<gc_type, key_type, value_type, traits > list_type;
+
+ list_type l;
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
+ TEST_F( LazyKVList_HP, wrapped_stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyKVList<gc_type, key_type, value_type, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
} // namespace
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test_kv_list_nogc.h"
test_ordered_iterator( l );
}
+ TEST_F( LazyKVList_NOGC, stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyKVList<gc_type, key_type, value_type, traits > list_type;
+
+ list_type l;
+ test( l );
+ test_ordered_iterator( l );
+ }
+
+ TEST_F( LazyKVList_NOGC, wrapped_stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyKVList<gc_type, key_type, value_type, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ test( l );
+ test_ordered_iterator( l );
+ }
+
} // namespace
test_hp( l );
}
+ TEST_F( LazyList_DHP, stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt<item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyList<gc_type, item, traits > list_type;
+
+ list_type l;
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
+ TEST_F( LazyList_DHP, wrapped_stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt<item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyList<gc_type, item, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
+
} // namespace
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test_list_hp.h"
test_hp( l );
}
+ TEST_F( LazyList_HP, stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt<item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyList<gc_type, item, traits > list_type;
+
+ list_type l;
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
+ TEST_F( LazyList_HP, wrapped_stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt<item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyList<gc_type, item, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ test_common( l );
+ test_ordered_iterator( l );
+ test_hp( l );
+ }
+
} // namespace
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test_list_nogc.h"
test_ordered_iterator( l );
}
+ TEST_F( LazyList_NOGC, stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt<item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyList<gc_type, item, traits > list_type;
+
+ list_type l;
+ test( l );
+ test_ordered_iterator( l );
+ }
+
+ TEST_F( LazyList_NOGC, wrapped_stat )
+ {
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef lt<item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyList<gc_type, item, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ test( l );
+ test_ordered_iterator( l );
+ }
+
} // namespace
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSUNIT_LIST_TEST_KV_LAZY_LIST_RCU_H
this->test_rcu( l );
}
+TYPED_TEST_P( LazyKVList, stat )
+{
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef typename TestFixture::lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyKVList<typename TestFixture::rcu_type, typename TestFixture::key_type, typename TestFixture::value_type, traits > list_type;
+
+ list_type l;
+ this->test_common( l );
+ this->test_ordered_iterator( l );
+ this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyKVList, wrapped_stat )
+{
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef typename TestFixture::lt less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyKVList<typename TestFixture::rcu_type, typename TestFixture::key_type, typename TestFixture::value_type, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ this->test_common( l );
+ this->test_ordered_iterator( l );
+ this->test_rcu( l );
+}
+
// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
// "No test named <test_name> can be found in this test case"
REGISTER_TYPED_TEST_CASE_P( LazyKVList,
- less_ordered, compare_ordered, mix_ordered, item_counting, backoff, seq_cst, mutex
+ less_ordered, compare_ordered, mix_ordered, item_counting, backoff, seq_cst, mutex, stat, wrapped_stat
);
#endif // CDSUNIT_LIST_TEST_KV_LAZY_LIST_RCU_H
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSUNIT_LIST_TEST_LAZY_LIST_RCU_H
this->test_rcu( l );
}
+TYPED_TEST_P( LazyList, stat )
+{
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef typename TestFixture::template lt< typename TestFixture::item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::stat<> stat;
+ };
+ typedef cc::LazyList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+ list_type l;
+ this->test_common( l );
+ this->test_ordered_iterator( l );
+ this->test_rcu( l );
+}
+
+TYPED_TEST_P( LazyList, wrapped_stat )
+{
+ struct traits: public cc::lazy_list::traits
+ {
+ typedef typename TestFixture::template lt< typename TestFixture::item> less;
+ typedef cds::atomicity::item_counter item_counter;
+ typedef cds::container::lazy_list::wrapped_stat<> stat;
+ };
+ typedef cc::LazyList<typename TestFixture::rcu_type, typename TestFixture::item, traits > list_type;
+
+ cds::container::lazy_list::stat<> st;
+ list_type l( st );
+ this->test_common( l );
+ this->test_ordered_iterator( l );
+ this->test_rcu( l );
+}
+
TYPED_TEST_P( LazyList, mutex )
{
struct traits : public cc::lazy_list::traits
// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
// "No test named <test_name> can be found in this test case"
REGISTER_TYPED_TEST_CASE_P( LazyList,
- less_ordered, compare_ordered, mix_ordered, item_counting, backoff, seq_cst, mutex
+ less_ordered, compare_ordered, mix_ordered, item_counting, backoff, seq_cst, mutex, stat, wrapped_stat
);
#endif // CDSUNIT_LIST_TEST_LAZY_LIST_RCU_H