From: khizmax Date: Sun, 8 Mar 2015 08:48:55 +0000 (+0300) Subject: added CDS_USE_VLD for all DebugVLD win projects X-Git-Tag: v2.1.0~305^2~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=19dc6133befe85d28e34aa6e898fa3c44519f386;p=libcds.git added CDS_USE_VLD for all DebugVLD win projects --- diff --git a/cds/sync/pool_monitor.h b/cds/sync/pool_monitor.h index f922954d..404c35d2 100644 --- a/cds/sync/pool_monitor.h +++ b/cds/sync/pool_monitor.h @@ -82,7 +82,7 @@ namespace cds { namespace sync { typedef typename pool_type::value_type lock_type; ///< node lock type typedef typename std::conditional< std::is_same< BackOff, cds::opt::none >::value, - cds::backoff::LockDefault, + cds::backoff::LockDefault, BackOff >::type back_off; ///< back-off strategy for spinning typedef uint32_t refspin_type; ///< Reference counter + spin-lock bit diff --git a/projects/Win/vc12/unit-map-delodd.vcxproj b/projects/Win/vc12/unit-map-delodd.vcxproj index f0966bbd..8474f43a 100644 --- a/projects/Win/vc12/unit-map-delodd.vcxproj +++ b/projects/Win/vc12/unit-map-delodd.vcxproj @@ -262,7 +262,7 @@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) + CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -343,7 +343,7 @@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) + CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-map-find.vcxproj b/projects/Win/vc12/unit-map-find.vcxproj index 89d21cf6..be592dd6 100644 --- a/projects/Win/vc12/unit-map-find.vcxproj +++ b/projects/Win/vc12/unit-map-find.vcxproj @@ -265,7 +265,7 @@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) + CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -347,7 +347,7 @@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) + CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-map-insdel.vcxproj b/projects/Win/vc12/unit-map-insdel.vcxproj index d90a65b5..cef34fd5 100644 --- a/projects/Win/vc12/unit-map-insdel.vcxproj +++ b/projects/Win/vc12/unit-map-insdel.vcxproj @@ -267,7 +267,7 @@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) + CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -348,7 +348,7 @@ /bigobj /Zc:inline %(AdditionalOptions) Disabled $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) + CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-misc.vcxproj b/projects/Win/vc12/unit-misc.vcxproj index 2946b2b1..55af6a66 100644 --- a/projects/Win/vc12/unit-misc.vcxproj +++ b/projects/Win/vc12/unit-misc.vcxproj @@ -259,7 +259,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -340,7 +340,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-pqueue.vcxproj b/projects/Win/vc12/unit-pqueue.vcxproj index 10cfc219..8b4e04b1 100644 --- a/projects/Win/vc12/unit-pqueue.vcxproj +++ b/projects/Win/vc12/unit-pqueue.vcxproj @@ -272,7 +272,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -353,7 +353,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-queue.vcxproj b/projects/Win/vc12/unit-queue.vcxproj index 218ec906..212768d7 100644 --- a/projects/Win/vc12/unit-queue.vcxproj +++ b/projects/Win/vc12/unit-queue.vcxproj @@ -259,7 +259,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -340,7 +340,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-set-delodd.vcxproj b/projects/Win/vc12/unit-set-delodd.vcxproj index 7728c01c..09ee4df8 100644 --- a/projects/Win/vc12/unit-set-delodd.vcxproj +++ b/projects/Win/vc12/unit-set-delodd.vcxproj @@ -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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-set-insdel.vcxproj b/projects/Win/vc12/unit-set-insdel.vcxproj index 865dcd0e..78c9695a 100644 --- a/projects/Win/vc12/unit-set-insdel.vcxproj +++ b/projects/Win/vc12/unit-set-insdel.vcxproj @@ -273,7 +273,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -354,7 +354,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/projects/Win/vc12/unit-stack.vcxproj b/projects/Win/vc12/unit-stack.vcxproj index 0a7f314f..e53c01a9 100644 --- a/projects/Win/vc12/unit-stack.vcxproj +++ b/projects/Win/vc12/unit-stack.vcxproj @@ -259,7 +259,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -340,7 +340,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) + CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL diff --git a/tests/cppunit/thread.h b/tests/cppunit/thread.h index edf0577e..811a15ec 100644 --- a/tests/cppunit/thread.h +++ b/tests/cppunit/thread.h @@ -10,6 +10,13 @@ #include // for attach/detach thread #include +// Visual leak detector (see http://vld.codeplex.com/) +#if defined(CDS_USE_VLD) && CDS_COMPILER == CDS_COMPILER_MSVC +# ifdef _DEBUG +# include +# endif +#endif + namespace CppUnitMini { static inline unsigned int Rand( unsigned int nMax ) {