diff options
author | Steve Huston <shuston@riverace.com> | 1999-06-25 20:24:05 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 1999-06-25 20:24:05 +0000 |
commit | 40cdf7eff65e4c297f49f31c6a7f97a5a493bbc8 (patch) | |
tree | cd40f7e489e4d2e228e2de2415a9239ef27936f9 /performance-tests | |
parent | bb7480ef4d41db32db556abe7fe868f5b23020f7 (diff) | |
download | ATCD-40cdf7eff65e4c297f49f31c6a7f97a5a493bbc8.tar.gz |
Move def of DC_Singleton from test_signleton.cpp to new file test_singleton.h.
Diffstat (limited to 'performance-tests')
-rw-r--r-- | performance-tests/Misc/test_singleton.cpp | 14 | ||||
-rw-r--r-- | performance-tests/Misc/test_singleton.h | 24 |
2 files changed, 26 insertions, 12 deletions
diff --git a/performance-tests/Misc/test_singleton.cpp b/performance-tests/Misc/test_singleton.cpp index 49c16f5f92a..9e8a50b56e1 100644 --- a/performance-tests/Misc/test_singleton.cpp +++ b/performance-tests/Misc/test_singleton.cpp @@ -32,6 +32,8 @@ #include "ace/Synch.h" #include "ace/Log_Msg.h" +#include "test_singleton.h" + ACE_RCSID(Misc, test_singleton, "$Id$") #if defined (ACE_HAS_THREADS) @@ -66,18 +68,6 @@ Mutex_Singleton::instance (void) return Mutex_Singleton::instance_; } -class DC_Singleton -{ -public: - DC_Singleton (void) {} - void svc (void) {} - static DC_Singleton *instance (void); - -private: - static ACE_Thread_Mutex lock_; - static DC_Singleton *instance_; -}; - ACE_Thread_Mutex DC_Singleton::lock_; DC_Singleton *DC_Singleton::instance_; diff --git a/performance-tests/Misc/test_singleton.h b/performance-tests/Misc/test_singleton.h new file mode 100644 index 00000000000..20dcfd2bf32 --- /dev/null +++ b/performance-tests/Misc/test_singleton.h @@ -0,0 +1,24 @@ +// $Id$ + +// Define the DC_Singleton here - it needs to be in a separate file to +// get picked up correctly on AIX with auto template instantiation using +// IBM C++ compiler (xlC). + +#ifndef __TEST_SINGLETON_H +#define __TEST_SINGLETON_H + +#include "ace/Synch.h" + +class DC_Singleton +{ +public: + DC_Singleton (void) {} + void svc (void) {} + static DC_Singleton *instance (void); + +private: + static ACE_Thread_Mutex lock_; + static DC_Singleton *instance_; +}; + +#endif /* __TEST_SINGLETON_H */ |