From 67737a56452fd69533bf61006db91c3b3a416a55 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Thu, 22 Oct 2015 23:20:47 -0700 Subject: [PATCH] Disable apithreadstress when STRESS_THREAD is not enabled --- src/inc/apithreadstress.h | 14 ++++++++++++++ src/utilcode/apithreadstress.cpp | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/inc/apithreadstress.h b/src/inc/apithreadstress.h index 0afc771..515e588 100644 --- a/src/inc/apithreadstress.h +++ b/src/inc/apithreadstress.h @@ -47,6 +47,8 @@ #include "utilcode.h" +#ifdef STRESS_THREAD + class APIThreadStress { public: @@ -74,4 +76,16 @@ class APIThreadStress }; +#else // STRESS_THREAD + +class APIThreadStress +{ + public: + BOOL DoThreadStress() { return FALSE; } + static void SyncThreadStress() { } + static void SetThreadStressCount(int count) { } +}; + +#endif // STRESS_THREAD + #endif // _APITHREADSTRESS_H_ diff --git a/src/utilcode/apithreadstress.cpp b/src/utilcode/apithreadstress.cpp index 1dba119..c893de7 100644 --- a/src/utilcode/apithreadstress.cpp +++ b/src/utilcode/apithreadstress.cpp @@ -9,6 +9,8 @@ #include "stdafx.h" +#ifdef STRESS_THREAD + #include "apithreadstress.h" #include "clrhost.h" #include "ex.h" @@ -179,3 +181,4 @@ void APIThreadStress::SyncThreadStress() } } +#endif // STRESS_THREAD \ No newline at end of file -- 2.7.4