summaryrefslogtreecommitdiff
path: root/ace/Singleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'ace/Singleton.h')
-rw-r--r--ace/Singleton.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/ace/Singleton.h b/ace/Singleton.h
index 034c2ee2ae7..7b40bd353d5 100644
--- a/ace/Singleton.h
+++ b/ace/Singleton.h
@@ -61,16 +61,10 @@ protected:
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
static ACE_Singleton<TYPE, ACE_LOCK> *singleton_;
// Pointer to the Singleton (ACE_Cleanup) instance.
-
- static ACE_LOCK ace_singleton_lock_;
- // Lock the creation of the singleton.
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
static ACE_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
// Get pointer to the Singleton instance.
-
- static ACE_LOCK &singleton_lock_i (void);
- // Get reference to Singleton lock.
};
template <class TYPE, class ACE_LOCK>
@@ -79,7 +73,7 @@ class ACE_TSS_Singleton : public ACE_Cleanup
// This class uses the Adapter pattern to turn ordinary classes
// into Thread-specific Singletons optimized with the
// Double-Checked Locking optimization pattern.
- //
+ //
// = DESCRIPTION
// This implementation is another variation on the GoF Singleton
// pattern. In this case, a single <ACE_TSS_Singleton<TYPE,
@@ -113,10 +107,10 @@ protected:
#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
static ACE_TSS_Singleton<TYPE, ACE_LOCK> *singleton_;
// Pointer to the Singleton (ACE_Cleanup) instance.
-
- static ACE_LOCK ace_singleton_lock_;
- // Lock the creation of the singleton.
#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
+
+ static ACE_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
+ // Get pointer to the TSS Singleton instance.
};
#if defined (__ACE_INLINE__)