diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-18 23:58:16 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-18 23:58:16 +0000 |
commit | a8fcae0ba1aedbe06e9beed88f91b06640978e1b (patch) | |
tree | e68953fa22f5f962fc525914a10947267827eb3f | |
parent | 87b31ac9d2890f65e4203ab8adbf9d8b1ead6f86 (diff) | |
download | ATCD-a8fcae0ba1aedbe06e9beed88f91b06640978e1b.tar.gz |
ChangeLogTag: Mon Sep 18 23:53:29 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 10 | ||||
-rw-r--r-- | TAO/tao/TAO_Internal.cpp | 23 |
2 files changed, 25 insertions, 8 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a6443981a08..ffad34f4dce 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,13 @@ +Mon Sep 18 23:53:29 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com> + + * tao/TAO_Internal.cpp: + + Replacing the usage of the global ACE lock with a separate + mutex, because the DLL Manager is also using the global + lock. This can cause a race condition in applications, which + re-enter the Service Configurator to load another DLL as part of + their own initialization. + Mon Sep 18 23:11:31 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com> This change fixes bug#2651, related to the order of destruction diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp index df39ae66321..5c8582c2f82 100644 --- a/TAO/tao/TAO_Internal.cpp +++ b/TAO/tao/TAO_Internal.cpp @@ -165,21 +165,15 @@ namespace TAO_BEGIN_VERSIONED_NAMESPACE_DECL +#if defined (ACE_HAS_THREADS) /// A little helper class to get around the TAO_Singleton::instance () /// inability to pass default initialization arguments to the /// singleton ctor. -#if defined (ACE_HAS_THREADS) class TAO_Ubergestalt_Ready_Condition : public ACE_SYNCH_RECURSIVE_CONDITION { public: - TAO_Ubergestalt_Ready_Condition (void) - : ACE_SYNCH_RECURSIVE_CONDITION - (*ACE_Static_Object_Lock::instance()) - { - }; - static TAO_Ubergestalt_Ready_Condition* instance (void) { // The first thread to get here will initialize the static @@ -191,6 +185,19 @@ public: return i_; }; + + TAO_Ubergestalt_Ready_Condition (void) + : ACE_SYNCH_RECURSIVE_CONDITION + (this->mutex_) + { + // empty + }; + +private: + /// The mutex, associated with the condition. Do not use the ACE + /// global mutex, because it causes deadlocks with other thrads that + /// may be in DLL_Manager::open() + ACE_Recursive_Thread_Mutex mutex_; }; #endif // ACE_HAS_THREADS @@ -206,7 +213,7 @@ TAO::ORB::open_services (ACE_Service_Gestalt* pcfg, -1)); // Wait in line, while the default ORB (which isn't us) completes - // initialization of the globaly reuired service objects + // initialization of the globaly required service objects if (service_open_count == 1) { if (TAO_debug_level > 4) |