From: khizmax Date: Wed, 25 Feb 2015 20:15:33 +0000 (+0300) Subject: On dev: bronson-unit-test X-Git-Tag: v2.1.0~305^2~49^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a9213ce45072f66144284647ccae242f91ca30af;p=libcds.git On dev: bronson-unit-test --- a9213ce45072f66144284647ccae242f91ca30af diff --cc cds/container/bronson_avltree_map_rcu.h index f5c6b603,f5c6b603..027586e6 --- a/cds/container/bronson_avltree_map_rcu.h +++ b/cds/container/bronson_avltree_map_rcu.h @@@ -97,6 -97,6 +97,10 @@@ namespace cds { namespace container /// Enabled or disabled @ref bronson_avltree::relaxed_insert "relaxed insertion" static bool const c_bRelaxedInsert = traits::relaxed_insert; ++ ++ /// Group of \p extract_xxx functions does not require external locking ++ static CDS_CONSTEXPR const bool c_bExtractLockExternal = base_class::c_bExtractLockExternal; ++ typedef typename base_class::rcu_lock rcu_lock; ///< RCU scoped lock /// Returned pointer to \p mapped_type of extracted node @@@ -278,6 -278,6 +282,15 @@@ return std::make_pair( result != 0, (result & update_flags::result_inserted) != 0 ); } ++ //@cond ++ template ++ std::pair ensure( K const& key, Func func ) ++ { ++ return update( key, func ); ++ } ++ //@endcond ++ ++ /// Delete \p key from the map /** RCU \p synchronize() method can be called. RCU should not be locked. diff --cc cds/container/impl/bronson_avltree_map_rcu.h index a314847f,a314847f..53d2950f --- a/cds/container/impl/bronson_avltree_map_rcu.h +++ b/cds/container/impl/bronson_avltree_map_rcu.h @@@ -67,6 -67,6 +67,9 @@@ namespace cds { namespace container /// Enabled or disabled @ref bronson_avltree::relaxed_insert "relaxed insertion" static CDS_CONSTEXPR bool const c_bRelaxedInsert = traits::relaxed_insert; ++ /// Group of \p extract_xxx functions does not require external locking ++ static CDS_CONSTEXPR const bool c_bExtractLockExternal = false; ++ # ifdef CDS_DOXYGEN_INVOKED /// Returned pointer to \p mapped_type of extracted node typedef cds::urcu::exempt_ptr< gc, T, T, disposer, void > exempt_ptr; @@@ -275,7 -275,7 +278,7 @@@ \p second is \p true if new node has been added or \p false if the node with \p key already exists. */ -- template ++ template std::pair update( K const& key, mapped_type pVal, bool bInsert = true ) { int result = do_update( key, key_comparator(), @@@ -288,6 -288,6 +291,15 @@@ return std::make_pair( result != 0, (result & update_flags::result_inserted) != 0 ); } ++ //@cond ++ template ++ std::pair ensure( K const& key, mapped_type pVal ) ++ { ++ return update( key, pVal, true ); ++ } ++ ++ //@endcond ++ /// Delete \p key from the map /** RCU \p synchronize() method can be called. RCU should not be locked. diff --cc projects/Win/vc12/unit-map-delodd.vcxproj index 206ec842,206ec842..f0966bbd --- a/projects/Win/vc12/unit-map-delodd.vcxproj +++ b/projects/Win/vc12/unit-map-delodd.vcxproj @@@ -214,7 -214,7 +214,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -238,7 -238,7 +238,7 @@@ /bigobj %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -262,7 -262,7 +262,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -289,7 -289,7 +289,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -316,7 -316,7 +316,7 @@@ /bigobj %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -343,7 -343,7 +343,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -370,7 -370,7 +370,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -398,7 -398,7 +398,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -430,7 -430,7 +430,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -461,7 -461,7 +461,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true diff --cc projects/Win/vc12/unit-map-find.vcxproj index 81a78e9c,81a78e9c..89d21cf6 --- a/projects/Win/vc12/unit-map-find.vcxproj +++ b/projects/Win/vc12/unit-map-find.vcxproj @@@ -216,7 -216,7 +216,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -224,7 -224,7 +224,7 @@@ Level3 EditAndContinue -- 4520 ++ %(DisableSpecificWarnings) unit-prerequisites_d.lib;%(AdditionalDependencies) @@@ -240,7 -240,7 +240,7 @@@ /bigobj %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -249,6 -249,6 +249,7 @@@ Level3 EditAndContinue true ++ %(DisableSpecificWarnings) unit-prerequisites_d.lib;%(AdditionalDependencies) @@@ -264,7 -264,7 +265,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -272,7 -272,7 +273,7 @@@ Level3 EditAndContinue -- 4520 ++ %(DisableSpecificWarnings) unit-prerequisites_d.lib;%(AdditionalDependencies) @@@ -291,7 -291,7 +292,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -299,7 -299,7 +300,7 @@@ Level3 ProgramDatabase -- 4520 ++ %(DisableSpecificWarnings) unit-prerequisites_d.lib;%(AdditionalDependencies) @@@ -318,7 -318,7 +319,7 @@@ /bigobj %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -327,6 -327,6 +328,7 @@@ Level3 ProgramDatabase true ++ %(DisableSpecificWarnings) unit-prerequisites_d.lib;%(AdditionalDependencies) @@@ -345,7 -345,7 +347,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -353,7 -353,7 +355,7 @@@ Level3 ProgramDatabase -- 4520 ++ %(DisableSpecificWarnings) unit-prerequisites_d.lib;%(AdditionalDependencies) @@@ -372,14 -372,14 +374,14 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase -- 4520 ++ %(DisableSpecificWarnings) unit-prerequisites.lib;%(AdditionalDependencies) @@@ -400,7 -400,7 +402,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -409,6 -409,6 +411,7 @@@ ProgramDatabase true HOST ++ %(DisableSpecificWarnings) unit-prerequisites.lib;%(AdditionalDependencies) @@@ -432,14 -432,14 +435,14 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true Level3 ProgramDatabase -- 4520 ++ %(DisableSpecificWarnings) unit-prerequisites.lib;%(AdditionalDependencies) @@@ -463,7 -463,7 +466,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -472,6 -472,6 +475,7 @@@ ProgramDatabase true HOST ++ %(DisableSpecificWarnings) unit-prerequisites.lib;%(AdditionalDependencies) diff --cc projects/Win/vc12/unit-map-insdel.vcxproj index 69b9ad33,69b9ad33..d90a65b5 --- a/projects/Win/vc12/unit-map-insdel.vcxproj +++ b/projects/Win/vc12/unit-map-insdel.vcxproj @@@ -219,7 -219,7 +219,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -243,7 -243,7 +243,7 @@@ /bigobj %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -267,7 -267,7 +267,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -294,7 -294,7 +294,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -321,7 -321,7 +321,7 @@@ /bigobj %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -348,7 -348,7 +348,7 @@@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@@ -375,7 -375,7 +375,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -403,7 -403,7 +403,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -435,7 -435,7 +435,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true @@@ -466,7 -466,7 +466,7 @@@ true Speed $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) -- WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) ++ WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) MultiThreadedDLL true diff --cc tests/unit/map2/map_defs.h index 1818e7dd,1818e7dd..4667f27c --- a/tests/unit/map2/map_defs.h +++ b/tests/unit/map2/map_defs.h @@@ -433,6 -433,6 +433,121 @@@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT CPPUNIT_TEST(EllenBinTreeMap_rcu_gpt_stat)\ CDSUNIT_TEST_EllenBinTreeMap_RCU_signal ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++# define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_cmp_ic) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_cmp_ic) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_cmp_ic_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_cmp_ic_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \ ++ ++# define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_cmp_ic) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_cmp_ic) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_cmp_ic_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_cmp_ic_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \ ++ ++#else ++# define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal ++# define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal ++#endif ++ ++#define CDSUNIT_DECLARE_BronsonAVLTreeMap \ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_cmp_ic)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_cmp_ic)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_cmp_ic)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_cmp_ic_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_cmp_ic_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_cmp_ic_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\ ++ TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\ ++ CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal ++ ++#define CDSUNIT_TEST_BronsonAVLTreeMap \ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_ic)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_ic)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_ic)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_ic_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_ic_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_ic_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\ ++ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\ ++ CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal #define CDSUNIT_DECLARE_StripedMap_common \ TEST_MAP(StripedMap_list) \ diff --cc tests/unit/map2/map_delodd.cpp index 655bc1f7,655bc1f7..02332e1e --- a/tests/unit/map2/map_delodd.cpp +++ b/tests/unit/map2/map_delodd.cpp @@@ -163,6 -163,6 +163,9 @@@ namespace map2 template void operator()( bool /*bNew*/, Q const& ) {} ++ template ++ void operator()( bool /*bNew*/, Q const&, V& ) ++ {} }; public: size_t m_nInsertSuccess; @@@ -731,6 -731,6 +734,7 @@@ CDSUNIT_DECLARE_CuckooMap CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap //CDSUNIT_DECLARE_StdMap CPPUNIT_TEST_SUITE( Map_DelOdd ) @@@ -738,6 -738,6 +742,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap //CDSUNIT_TEST_StripedMap //CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_find_int.cpp index 0933cdf1,0933cdf1..789fc180 --- a/tests/unit/map2/map_find_int.cpp +++ b/tests/unit/map2/map_find_int.cpp @@@ -266,6 -266,6 +266,7 @@@ namespace map2 CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_SkipListMap_nogc CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -279,6 -279,6 +280,7 @@@ CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_SkipListMap_nogc CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_find_string.cpp index d4cb0ca7,d4cb0ca7..d796bef6 --- a/tests/unit/map2/map_find_string.cpp +++ b/tests/unit/map2/map_find_string.cpp @@@ -261,6 -261,6 +261,7 @@@ namespace map2 CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_SkipListMap_nogc CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -274,6 -274,6 +275,7 @@@ CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_SkipListMap_nogc CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insdel_func.cpp index 365f2de7,365f2de7..5309f023 --- a/tests/unit/map2/map_insdel_func.cpp +++ b/tests/unit/map2/map_insdel_func.cpp @@@ -531,6 -531,6 +531,7 @@@ namespace map2 CDSUNIT_DECLARE_SplitList CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -540,6 -540,6 +541,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insdel_int.cpp index b669d028,b669d028..57a2031d --- a/tests/unit/map2/map_insdel_int.cpp +++ b/tests/unit/map2/map_insdel_int.cpp @@@ -258,6 -258,6 +258,7 @@@ namespace map2 CDSUNIT_DECLARE_SplitList CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -268,6 -268,6 +269,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insdel_item_int.cpp index ddf1726b,ddf1726b..deb0432f --- a/tests/unit/map2/map_insdel_item_int.cpp +++ b/tests/unit/map2/map_insdel_item_int.cpp @@@ -50,6 -50,6 +50,13 @@@ namespace map2 if ( bNew ) item.second = item.first; } ++ ++ // for BronsonAVLTreeMap ++ void operator()( bool bNew, key_type key, value_type& val ) ++ { ++ if ( bNew ) ++ val = key; ++ } }; public: @@@ -259,6 -259,6 +266,7 @@@ CDSUNIT_DECLARE_SplitList CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -269,6 -269,6 +277,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insdel_item_string.cpp index be1ccb95,be1ccb95..a34be050 --- a/tests/unit/map2/map_insdel_item_string.cpp +++ b/tests/unit/map2/map_insdel_item_string.cpp @@@ -95,6 -95,6 +95,11 @@@ namespace map2 { val.second = 0; } ++ // for BronsonAVLTreeMap ++ void operator()( typename Map::mapped_type& val ) ++ { ++ val = 0; ++ } }; virtual Deleter * clone() @@@ -260,6 -260,6 +265,7 @@@ CDSUNIT_DECLARE_SplitList CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -270,6 -270,6 +276,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insdel_string.cpp index 96828903,96828903..f95b838b --- a/tests/unit/map2/map_insdel_string.cpp +++ b/tests/unit/map2/map_insdel_string.cpp @@@ -259,6 -259,6 +259,7 @@@ namespace map2 CDSUNIT_DECLARE_SplitList CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -269,6 -269,6 +270,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insdelfind.cpp index 60a925e8,60a925e8..79bfc2fd --- a/tests/unit/map2/map_insdelfind.cpp +++ b/tests/unit/map2/map_insdelfind.cpp @@@ -253,6 -253,6 +253,7 @@@ namespace map2 CDSUNIT_DECLARE_SplitList CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -263,6 -263,6 +264,7 @@@ CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_insfind_int.cpp index 95faddff,95faddff..fc13e27f --- a/tests/unit/map2/map_insfind_int.cpp +++ b/tests/unit/map2/map_insfind_int.cpp @@@ -203,6 -203,6 +203,7 @@@ namespace map2 CDSUNIT_DECLARE_SkipListMap CDSUNIT_DECLARE_SkipListMap_nogc CDSUNIT_DECLARE_EllenBinTreeMap ++ CDSUNIT_DECLARE_BronsonAVLTreeMap CDSUNIT_DECLARE_StripedMap CDSUNIT_DECLARE_RefinableMap CDSUNIT_DECLARE_CuckooMap @@@ -216,6 -216,6 +217,7 @@@ CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_SkipListMap_nogc CDSUNIT_TEST_EllenBinTreeMap ++ CDSUNIT_TEST_BronsonAVLTreeMap CDSUNIT_TEST_StripedMap CDSUNIT_TEST_RefinableMap CDSUNIT_TEST_CuckooMap diff --cc tests/unit/map2/map_types.h index ff63de4e,ff63de4e..75181375 --- a/tests/unit/map2/map_types.h +++ b/tests/unit/map2/map_types.h @@@ -41,6 -41,6 +41,9 @@@ #include #include ++#include ++#include ++ #include #if BOOST_VERSION >= 104800 # include @@@ -62,6 -62,6 +65,7 @@@ #include "print_split_list_stat.h" #include "print_skip_list_stat.h" #include "print_ellenbintree_stat.h" ++#include "print_bronsonavltree_stat.h" #include "ellen_bintree_update_desc_pool.h" namespace map2 { @@@ -1714,6 -1714,6 +1718,131 @@@ typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_stat_sht > EllenBinTreeMap_rcu_sht_stat; #endif ++ // *************************************************************************** ++ // BronsonAVLTreeMap ++ typedef cds::memory::vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_simple_pool; ++ typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_lazy_pool; ++ typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_bounded_pool; ++ ++ struct BronsonAVLTreeMap_less: public ++ cc::bronson_avltree::make_traits< ++ co::less< less > ++ ,cc::bronson_avltree::relaxed_insert< false > ++ >::type ++ {}; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpi_less; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpb_less; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpt_less; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_shb_less; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_sht_less; ++#endif ++ struct BronsonAVLTreeMap_less_stat : public BronsonAVLTreeMap_less ++ { ++ typedef cc::bronson_avltree::stat<> stat; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_gpi_less_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_gpb_less_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_gpt_less_stat; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_shb_less_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_stat > BronsonAVLTreeMap_rcu_sht_less_stat; ++#endif ++ struct BronsonAVLTreeMap_cmp_ic: public ++ cc::bronson_avltree::make_traits< ++ co::less< compare > ++ ,cc::bronson_avltree::relaxed_insert< true > ++ ,co::item_counter< cds::atomicity::item_counter > ++ >::type ++ {}; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_gpi_cmp_ic; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_gpb_cmp_ic; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_gpt_cmp_ic; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_shb_cmp_ic; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_ic > BronsonAVLTreeMap_rcu_sht_cmp_ic; ++#endif ++ struct BronsonAVLTreeMap_cmp_ic_stat : public BronsonAVLTreeMap_cmp_ic ++ { ++ typedef cc::bronson_avltree::stat<> stat; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_gpi_cmp_ic_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_gpb_cmp_ic_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_gpt_cmp_ic_stat; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_shb_cmp_ic_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_ic_stat > BronsonAVLTreeMap_rcu_sht_cmp_ic_stat; ++#endif ++ ++ struct BronsonAVLTreeMap_less_pool_simple: public BronsonAVLTreeMap_less ++ { ++ typedef cds::sync::pool_monitor sync_monitor; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpi_less_pool_simple; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpb_less_pool_simple; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpt_less_pool_simple; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_shb_less_pool_simple; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_sht_less_pool_simple; ++#endif ++ struct BronsonAVLTreeMap_less_pool_simple_stat : public BronsonAVLTreeMap_less_pool_simple ++ { ++ typedef cc::bronson_avltree::stat<> stat; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat; ++#endif ++ struct BronsonAVLTreeMap_less_pool_lazy: public BronsonAVLTreeMap_less ++ { ++ typedef cds::sync::pool_monitor sync_monitor; ++ static CDS_CONSTEXPR bool const relaxed_insert = true; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_shb_less_pool_lazy; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_sht_less_pool_lazy; ++#endif ++ struct BronsonAVLTreeMap_less_pool_lazy_stat : public BronsonAVLTreeMap_less_pool_lazy ++ { ++ typedef cc::bronson_avltree::stat<> stat; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat; ++#endif ++ struct BronsonAVLTreeMap_less_pool_bounded: public BronsonAVLTreeMap_less ++ { ++ typedef cds::sync::pool_monitor sync_monitor; ++ static CDS_CONSTEXPR bool const relaxed_insert = true; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_shb_less_pool_bounded; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_sht_less_pool_bounded; ++#endif ++ struct BronsonAVLTreeMap_less_pool_bounded_stat : public BronsonAVLTreeMap_less_pool_bounded ++ { ++ typedef cc::bronson_avltree::stat<> stat; ++ }; ++ typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat; ++#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED ++ typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat; ++ typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat; ++#endif ++ // *************************************************************************** // Standard implementations @@@ -1799,6 -1799,6 +1928,21 @@@ ellen_bintree_check::check_stat( s.statistics() ); } ++ // BronsonAVLTreeMap ++ template ++ static inline void print_stat( cc::BronsonAVLTreeMap const& s ) ++ { ++ CPPUNIT_MSG( s.statistics() ); ++ } ++ ++ template ++ static inline void additional_check( cc::BronsonAVLTreeMap& m ) ++ { ++ m.check_consistency([]( size_t nLevel, size_t hLeft, size_t hRight ) ++ { ++ CPPUNIT_MSG( "Tree violation on level=" << nLevel << ": hLeft=" << hLeft << ", hRight=" << hRight ) ++ }); ++ } template static inline void print_stat( CuckooMap< K, V, Traits > const& m )