diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-02 06:23:09 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-06-02 06:23:09 +0000 |
commit | bed88a9e9b1637a4fffc4a0ba27a138fdce7f60d (patch) | |
tree | 689409ae3a062b8f19f3ba02838278726003559a /ace/Service_Repository.cpp | |
parent | a8d245fecc62ee2b62a3faa9538b74a2eaf993cd (diff) | |
download | ATCD-bed88a9e9b1637a4fffc4a0ba27a138fdce7f60d.tar.gz |
Reverted MP safe Double-checking modification. It doesn't solve the real problem here.
Diffstat (limited to 'ace/Service_Repository.cpp')
-rw-r--r-- | ace/Service_Repository.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp index 7556eb24685..fd5eb704575 100644 --- a/ace/Service_Repository.cpp +++ b/ace/Service_Repository.cpp @@ -13,7 +13,6 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Service_Repository) // Process-wide Service Repository. ACE_Service_Repository *ACE_Service_Repository::svc_rep_ = 0; -int ACE_Service_Repository::instantiated_ = 0; // Controls whether the Service_Repository is deleted when we shut // down (we can only delete it safely if we created it!) @@ -38,17 +37,16 @@ ACE_Service_Repository::instance (int size /* = ACE_Service_Repository::DEFAULT_ { ACE_TRACE ("ACE_Service_Config::instance"); - if (ACE_Service_Repository::instantiated_ == 0) + if (ACE_Service_Repository::svc_rep_ == 0) { // Perform Double-Checked Locking Optimization. ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, *ACE_Static_Object_Lock::instance (), 0)); - if (ACE_Service_Repository::instantiated_ == 0) + if (ACE_Service_Repository::svc_rep_ == 0) { ACE_NEW_RETURN (ACE_Service_Repository::svc_rep_, ACE_Service_Repository (size), 0); ACE_Service_Repository::delete_svc_rep_ = 1; - ACE_Service_Repository::instantiated_ = -1; } } return ACE_Service_Repository::svc_rep_; @@ -66,7 +64,6 @@ ACE_Service_Repository::instance (ACE_Service_Repository *s) ACE_Service_Repository::delete_svc_rep_ = 0; ACE_Service_Repository::svc_rep_ = s; - ACE_Service_Repository::instantiated_ = (s != 0 ? -1 : 0); return t; } @@ -83,7 +80,6 @@ ACE_Service_Repository::close_singleton (void) delete ACE_Service_Repository::svc_rep_; ACE_Service_Repository::svc_rep_ = 0; ACE_Service_Repository::delete_svc_rep_ = 0; - ACE_Service_Repository::instantiated_ = 0; } } |