diff options
Diffstat (limited to 'trunk/ACE/performance-tests/Synch-Benchmarks/Perf_Test/adaptive_recursive_lock_test.cpp')
-rw-r--r-- | trunk/ACE/performance-tests/Synch-Benchmarks/Perf_Test/adaptive_recursive_lock_test.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/trunk/ACE/performance-tests/Synch-Benchmarks/Perf_Test/adaptive_recursive_lock_test.cpp b/trunk/ACE/performance-tests/Synch-Benchmarks/Perf_Test/adaptive_recursive_lock_test.cpp new file mode 100644 index 00000000000..cc49bf1b698 --- /dev/null +++ b/trunk/ACE/performance-tests/Synch-Benchmarks/Perf_Test/adaptive_recursive_lock_test.cpp @@ -0,0 +1,33 @@ +// $Id$ + +#define ACE_BUILD_SVC_DLL +#include "ace/Log_Msg.h" +#include "Adaptive_Lock_Performance_Test_Base.h" +#include "ace/Lock_Adapter_T.h" +#include "ace/Recursive_Thread_Mutex.h" + +ACE_RCSID(Synch_Benchmarks, adaptive_recursive_lock_test, "$Id$") + +#if defined (ACE_HAS_THREADS) + +class ACE_Svc_Export Adaptive_Recursive_Lock_Test : public Adaptive_Lock_Performance_Test_Base +{ +public: + virtual int init (int, ACE_TCHAR *[]); +}; + +int +Adaptive_Recursive_Lock_Test::init (int, ACE_TCHAR *[]) +{ + ACE_Lock *lock; + ACE_NEW_RETURN (lock, + ACE_Lock_Adapter<ACE_Recursive_Thread_Mutex> (), + -1); + + return this->set_lock (lock); +} + +ACE_SVC_FACTORY_DECLARE (Adaptive_Recursive_Lock_Test) +ACE_SVC_FACTORY_DEFINE (Adaptive_Recursive_Lock_Test) + +#endif /* ACE_HAS_THREADS */ |