summaryrefslogtreecommitdiff
path: root/ace/Singleton.h
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-22 21:34:03 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-22 21:34:03 +0000
commitab496543495cfa9599bb85dfac8acfd1cab889df (patch)
tree3be789bff0ab97153eea9548103f125117688578 /ace/Singleton.h
parent571aacd452f66485e60007e485f8844bc67436a0 (diff)
downloadATCD-ab496543495cfa9599bb85dfac8acfd1cab889df.tar.gz
moved ace_singleton_lock_ to Object_Manager
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__)