diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-24 17:49:22 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-10-24 17:49:22 +0000 |
commit | dadd518de64c32dfea80eab972ed53df119fdb5b (patch) | |
tree | 220b441de387fa088e466e104590233458bf71a7 /ace/Object_Manager.h | |
parent | 23184fa3f1ad1d46c2cf125236a76e6cc48728ea (diff) | |
download | ATCD-dadd518de64c32dfea80eab972ed53df119fdb5b.tar.gz |
(get_singleton_lock): dynamically allocate ACE_Thread_Mutex and ACE_RW_Thread_Mutex locks, so we end up with one lock per ACE_Singleton instantiation.
Diffstat (limited to 'ace/Object_Manager.h')
-rw-r--r-- | ace/Object_Manager.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/ace/Object_Manager.h b/ace/Object_Manager.h index faf9c8e6968..511003bd9e0 100644 --- a/ace/Object_Manager.h +++ b/ace/Object_Manager.h @@ -169,8 +169,6 @@ public: ACE_SIG_HANDLER_LOCK, ACE_SINGLETON_NULL_LOCK, ACE_SINGLETON_RECURSIVE_THREAD_LOCK, - ACE_SINGLETON_RW_THREAD_LOCK, - ACE_SINGLETON_THREAD_LOCK, ACE_SVC_HANDLER_LOCK, ACE_THREAD_EXIT_LOCK, ACE_TOKEN_MANAGER_CREATION_LOCK, @@ -228,20 +226,25 @@ public: // ACE_Singleton _only_. The arguments are ignored; they are // only used for overload resolution. - static ACE_Null_Mutex *get_singleton_lock (ACE_Null_Mutex *); - // Accesses a null lock to be used for construction of ACE_Singletons. + static int get_singleton_lock (ACE_Null_Mutex *&); + // Accesses a null lock to be used for construction of + // ACE_Singletons. Returns 0, and the lock in the argument, on + // success; returns -1 on failure. - static ACE_Thread_Mutex *get_singleton_lock (ACE_Thread_Mutex *); + static int get_singleton_lock (ACE_Thread_Mutex *&); // Accesses a non-recursve lock to be used for construction of - // ACE_Singletons. + // ACE_Singletons. Returns 0, and the lock in the argument, on + // success; returns -1 on failure. - static ACE_Recursive_Thread_Mutex *get_singleton_lock - (ACE_Recursive_Thread_Mutex *); - // Accesses a recursive lock to be used for construction of ACE_Singletons. + static int get_singleton_lock (ACE_Recursive_Thread_Mutex *&); + // Accesses a recursive lock to be used for construction of + // ACE_Singletons. Returns 0, and the lock in the argument, on + // success; returns -1 on failure. - static ACE_RW_Thread_Mutex *get_singleton_lock (ACE_RW_Thread_Mutex *); + static int get_singleton_lock (ACE_RW_Thread_Mutex *&); // Accesses a readers/writers lock to be used for construction of - // ACE_Singletons. + // ACE_Singletons. Returns 0, and the lock in the argument, on + // success; returns -1 on failure. private: @@ -267,7 +270,7 @@ public: // For internal use only by ACE_Managed_Objects. #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - ACE_Thread_Mutex *lock_; + ACE_Recursive_Thread_Mutex *lock_; // Lock that is used to guard internal structures. Just a pointer // is declared here in order to minimize the headers that this one // includes. |