summaryrefslogtreecommitdiff
path: root/ace/Singleton.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-10-04 17:12:45 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-10-04 17:12:45 +0000
commit62cf2bef265867e8cad31162313bc350442ba9c9 (patch)
treedb5505b55d7cdbaa5ce8771e5e947b4e05a0876d /ace/Singleton.cpp
parentb818e19903ba56cdf5ef1c01e49e225fe5f33561 (diff)
downloadATCD-62cf2bef265867e8cad31162313bc350442ba9c9.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Singleton.cpp')
-rw-r--r--ace/Singleton.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/ace/Singleton.cpp b/ace/Singleton.cpp
index 640114918f7..812688b01e1 100644
--- a/ace/Singleton.cpp
+++ b/ace/Singleton.cpp
@@ -13,35 +13,35 @@
#include "ace/Singleton.i"
#endif /* __ACE_INLINE__ */
-template <class TYPE, class LOCK> void
-ACE_Singleton<TYPE, LOCK>::dump (void)
+template <class TYPE, class ACE_LOCK> void
+ACE_Singleton<TYPE, ACE_LOCK>::dump (void)
{
- ACE_TRACE ("ACE_Singleton<TYPE, LOCK>::dump");
+ ACE_TRACE ("ACE_Singleton<TYPE, ACE_LOCK>::dump");
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
ACE_DEBUG ((LM_DEBUG, "instance_ = %x",
- ACE_Singleton<TYPE, LOCK>::instance_i ()));
- ACE_Singleton<TYPE, LOCK>::singleton_lock_i ().dump ();
+ ACE_Singleton<TYPE, ACE_LOCK>::instance_i ()));
+ ACE_Singleton<TYPE, ACE_LOCK>::singleton_lock_i ().dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
-template <class TYPE, class LOCK> ACE_Singleton<TYPE, LOCK> *&
-ACE_Singleton<TYPE, LOCK>::instance_i (void)
+template <class TYPE, class ACE_LOCK> ACE_Singleton<TYPE, ACE_LOCK> *&
+ACE_Singleton<TYPE, ACE_LOCK>::instance_i (void)
{
#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Pointer to the Singleton instance. This works around a bug with
// G++ and it's (mis-)handling of templates and statics...
- static ACE_Singleton<TYPE, LOCK> *singleton_ = 0;
+ static ACE_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
return singleton_;
#else
- return ACE_Singleton<TYPE, LOCK>::singleton_;
+ return ACE_Singleton<TYPE, ACE_LOCK>::singleton_;
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
-template <class TYPE, class LOCK> LOCK &
-ACE_Singleton<TYPE, LOCK>::singleton_lock_i (void)
+template <class TYPE, class ACE_LOCK> LOCK &
+ACE_Singleton<TYPE, ACE_LOCK>::singleton_lock_i (void)
{
#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Lock the creation of the singleton. This works around a
@@ -50,26 +50,26 @@ ACE_Singleton<TYPE, LOCK>::singleton_lock_i (void)
return ace_singleton_lock_;
#else
- return ACE_Singleton<TYPE, LOCK>::ace_singleton_lock_;
+ return ACE_Singleton<TYPE, ACE_LOCK>::ace_singleton_lock_;
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
-template <class TYPE, class LOCK> TYPE *
-ACE_Singleton<TYPE, LOCK>::instance (void)
+template <class TYPE, class ACE_LOCK> TYPE *
+ACE_Singleton<TYPE, ACE_LOCK>::instance (void)
{
- ACE_TRACE ("ACE_Singleton<TYPE, LOCK>::instance");
+ ACE_TRACE ("ACE_Singleton<TYPE, ACE_LOCK>::instance");
- ACE_Singleton<TYPE, LOCK> *&singleton =
- ACE_Singleton<TYPE, LOCK>::instance_i ();
+ ACE_Singleton<TYPE, ACE_LOCK> *&singleton =
+ ACE_Singleton<TYPE, ACE_LOCK>::instance_i ();
// Perform the Double-Check pattern...
if (singleton == 0)
{
- ACE_GUARD_RETURN (LOCK, ace_mon, (ACE_Singleton<TYPE, LOCK>::singleton_lock_i ()), 0);
+ ACE_GUARD_RETURN (LOCK, ace_mon, (ACE_Singleton<TYPE, ACE_LOCK>::singleton_lock_i ()), 0);
if (singleton == 0)
{
- ACE_NEW_RETURN (singleton, (ACE_Singleton<TYPE, LOCK>), 0);
+ ACE_NEW_RETURN (singleton, (ACE_Singleton<TYPE, ACE_LOCK>), 0);
// Register for destruction with ACE_Object_Manager.
ACE_Object_Manager::at_exit (singleton);
@@ -79,26 +79,26 @@ ACE_Singleton<TYPE, LOCK>::instance (void)
return &singleton->instance_;
}
-template <class TYPE, class LOCK> void
-ACE_Singleton<TYPE, LOCK>::cleanup (void *)
+template <class TYPE, class ACE_LOCK> void
+ACE_Singleton<TYPE, ACE_LOCK>::cleanup (void *)
{
delete this;
}
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Pointer to the Singleton instance.
-template <class TYPE, class LOCK> ACE_Singleton<TYPE, LOCK> *
-ACE_Singleton<TYPE, LOCK>::singleton_ = 0;
+template <class TYPE, class ACE_LOCK> ACE_Singleton<TYPE, ACE_LOCK> *
+ACE_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
// Lock the creation of the singleton.
-template <class TYPE, class LOCK> LOCK
-ACE_Singleton<TYPE, LOCK>::ace_singleton_lock_;
+template <class TYPE, class ACE_LOCK> LOCK
+ACE_Singleton<TYPE, ACE_LOCK>::ace_singleton_lock_;
#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */
-template <class TYPE, class LOCK> void
-ACE_TSS_Singleton<TYPE, LOCK>::dump (void)
+template <class TYPE, class ACE_LOCK> void
+ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
{
- ACE_TRACE ("ACE_TSS_Singleton<TYPE, LOCK>::dump");
+ ACE_TRACE ("ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump");
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
ACE_DEBUG ((LM_DEBUG, "instance_ = %x", &singleton_->instance_));
@@ -107,15 +107,15 @@ ACE_TSS_Singleton<TYPE, LOCK>::dump (void)
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
-template <class TYPE, class LOCK> TYPE *
-ACE_TSS_Singleton<TYPE, LOCK>::instance (void)
+template <class TYPE, class ACE_LOCK> TYPE *
+ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance (void)
{
- ACE_TRACE ("ACE_TSS_Singleton<TYPE, LOCK>::instance");
+ ACE_TRACE ("ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance");
#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Pointer to the Singleton instance. This works around a bug with
// G++...
- static ACE_TSS_Singleton<TYPE, LOCK> *singleton_ = 0;
+ static ACE_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
// Lock the creation of the singleton. This works around a
// "feature" of G++... ;-)
@@ -128,7 +128,7 @@ ACE_TSS_Singleton<TYPE, LOCK>::instance (void)
if (singleton_ == 0)
{
- ACE_NEW_RETURN (singleton_, (ACE_TSS_Singleton<TYPE, LOCK>), 0);
+ ACE_NEW_RETURN (singleton_, (ACE_TSS_Singleton<TYPE, ACE_LOCK>), 0);
#if 0 /* ACE_Object_Manager::at_thread_exit () is not implemented yet. */
// Register for destruction with ACE_Object_Manager.
@@ -142,11 +142,11 @@ ACE_TSS_Singleton<TYPE, LOCK>::instance (void)
// Perform the Double-Check pattern...
if (singleton_ == 0)
{
- ACE_GUARD_RETURN (LOCK, ace_mon, (ACE_TSS_Singleton<TYPE, LOCK>::ace_singleton_lock_), 0);
+ ACE_GUARD_RETURN (LOCK, ace_mon, (ACE_TSS_Singleton<TYPE, ACE_LOCK>::ace_singleton_lock_), 0);
if (singleton_ == 0)
{
- ACE_NEW_RETURN (singleton_, (ACE_TSS_Singleton<TYPE, LOCK>), 0);
+ ACE_NEW_RETURN (singleton_, (ACE_TSS_Singleton<TYPE, ACE_LOCK>), 0);
#if 0 /* ACE_Object_Manager::at_thread_exit () is not implemented yet. */
// Register for destruction with ACE_Object_Manager.
@@ -160,8 +160,8 @@ ACE_TSS_Singleton<TYPE, LOCK>::instance (void)
return ACE_TSS_GET (&singleton_->instance_, TYPE);
}
-template <class TYPE, class LOCK> void
-ACE_TSS_Singleton<TYPE, LOCK>::cleanup (void *)
+template <class TYPE, class ACE_LOCK> void
+ACE_TSS_Singleton<TYPE, ACE_LOCK>::cleanup (void *)
{
ACE_TRACE ("ACE_TSS_Singleton::cleanup");
@@ -170,12 +170,12 @@ ACE_TSS_Singleton<TYPE, LOCK>::cleanup (void *)
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Pointer to the Singleton instance.
-template <class TYPE, class LOCK> ACE_TSS_Singleton <TYPE, LOCK> *
-ACE_TSS_Singleton<TYPE, LOCK>::singleton_ = 0;
+template <class TYPE, class ACE_LOCK> ACE_TSS_Singleton <TYPE, ACE_LOCK> *
+ACE_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
// Lock the creation of the singleton.
-template <class TYPE, class LOCK> LOCK
-ACE_TSS_Singleton<TYPE, LOCK>::ace_singleton_lock_;
+template <class TYPE, class ACE_LOCK> LOCK
+ACE_TSS_Singleton<TYPE, ACE_LOCK>::ace_singleton_lock_;
#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */
#endif /* ACE_SINGLETON_C */