summaryrefslogtreecommitdiff
path: root/ace/Object_Manager.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-06 21:12:20 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-06 21:12:20 +0000
commit58565c318d037e3df06ad5467fd8f6b8fc50420d (patch)
treed05198cdd09f731efbc67b0d0752c786163b9dc8 /ace/Object_Manager.cpp
parente9bbb8fa95def20fee26be9d79bc8ab54dad2d7d (diff)
downloadATCD-58565c318d037e3df06ad5467fd8f6b8fc50420d.tar.gz
ChangeLogTag: Tue Jul 06 15:56:19 1999 David L. Levine <levine@cs.wustl.edu>
Diffstat (limited to 'ace/Object_Manager.cpp')
-rw-r--r--ace/Object_Manager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/ace/Object_Manager.cpp b/ace/Object_Manager.cpp
index 0d7f1b04e85..70c0d7fee03 100644
--- a/ace/Object_Manager.cpp
+++ b/ace/Object_Manager.cpp
@@ -252,7 +252,7 @@ ACE_Object_Manager::init (void)
return 0;
} else {
// Had already initialized.
- return -1;
+ return 1;
}
}
@@ -423,7 +423,7 @@ ACE_Object_Manager::get_singleton_lock (ACE_Thread_Mutex *&lock)
*ACE_Object_Manager::instance ()->
internal_lock_,
-1));
-
+
if (lock == 0)
{
ACE_Cleanup_Adapter<ACE_Thread_Mutex> *lock_adapter;
@@ -431,7 +431,7 @@ ACE_Object_Manager::get_singleton_lock (ACE_Thread_Mutex *&lock)
ACE_Cleanup_Adapter<ACE_Thread_Mutex>,
-1);
lock = &lock_adapter->object ();
-
+
// Register the lock for destruction at program
// termination. This call will cause us to grab the
// ACE_Object_Manager::instance ()->internal_lock_
@@ -457,7 +457,7 @@ ACE_Object_Manager::get_singleton_lock (ACE_Mutex *&lock)
// instance has been destroyed, so the internal lock is not
// available. Either way, we can not use double-checked
// locking. So, we'll leak the lock.
-
+
ACE_NEW_RETURN (lock,
ACE_Mutex,
-1);
@@ -541,7 +541,7 @@ ACE_Object_Manager::get_singleton_lock (ACE_RW_Thread_Mutex *&lock)
// instance has been destroyed, so the internal lock is not
// available. Either way, we can not use double-checked
// locking. So, we'll leak the lock.
-
+
ACE_NEW_RETURN (lock,
ACE_RW_Thread_Mutex,
-1);
@@ -593,7 +593,7 @@ ACE_Object_Manager::fini (void)
if (shutting_down_i ())
// Too late. Or, maybe too early. Either fini () has already
// been called, or init () was never called.
- return -1;
+ return object_manager_state_ == OBJ_MAN_SHUT_DOWN ? 1 : -1;
// No mutex here. Only the main thread should destroy the singleton
// ACE_Object_Manager instance.