diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-04-11 23:30:37 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-04-11 23:30:37 +0000 |
commit | e8b6541f11b118a26c624938553835a68a75456d (patch) | |
tree | e98848f2567abd41e6b5c9d9227509dc6fa4192c /TAO | |
parent | 8bcfbac0cb59ec05ba951e50d2c55a180842d284 (diff) | |
download | ATCD-e8b6541f11b118a26c624938553835a68a75456d.tar.gz |
.
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-99c | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp | 40 |
2 files changed, 28 insertions, 19 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 83cab1a9bcc..d266ec874c5 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,10 @@ +Sun Apr 11 18:29:47 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * orbsvcs/orbsvcs/Naming/Naming_Utils.cpp (TAO_Naming_Client): + Fixed the use of ACE_Thread_Mutex to ACE_SYNCH_MUTEX to ensure + this will run properly on non-threaded platforms. Thanks to + Alex for reporting this. + Sun Apr 11 15:36:33 1999 Balachandran Natarajan <bala@cs.wustl.edu> * examples/POA/DSI/Database_i.cpp diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp index 2baa4fc0010..6c6a3d5b992 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp @@ -52,7 +52,8 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb, CORBA::Object_var naming_obj; if (resolve_for_existing_naming_service) - naming_obj = orb->resolve_initial_references ("NameService", timeout); + naming_obj = orb->resolve_initial_references ("NameService", + timeout); if (CORBA::is_nil (naming_obj.in ())) { @@ -105,14 +106,16 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb, { if (persistence_location != 0) { - TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> *index = - new TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> (orb, poa); - + TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> *index = + new TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> (orb, + poa); if (index->open (persistence_location) == -1) - ACE_DEBUG ((LM_DEBUG, "index->open failed")); + ACE_DEBUG ((LM_DEBUG, + "index->open failed")); - if (index->init() == -1) - ACE_DEBUG ((LM_DEBUG, "index->init failed")); + if (index->init () == -1) + ACE_DEBUG ((LM_DEBUG, + "index->init failed")); // Set the ior and objref to the root naming context. this->naming_service_ior_= index->root_ior (); @@ -136,8 +139,8 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb, TAO_Naming_Context, -1); - // Put c_impl into the auto pointer temporarily, in case next - // allocation fails. + // Put c_impl into the auto pointer temporarily, in case + // next allocation fails. ACE_Auto_Basic_Ptr<TAO_Naming_Context> temp (c); ACE_NEW_RETURN (c_impl, @@ -147,7 +150,6 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb, context_size, 1), -1); - PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId ("NameService"); @@ -160,9 +162,9 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb, c->_this (ACE_TRY_ENV); ACE_TRY_CHECK; - // Stringify the objref we'll be implementing, and print it to - // stdout. Someone will take that string and give it to a - // client. + // Stringify the objref we'll be implementing, and print it + // to stdout. Someone will take that string and give it to + // a client. this->naming_service_ior_= orb->object_to_string (this->naming_context_.in (), ACE_TRY_ENV); @@ -326,12 +328,12 @@ TAO_Naming_Client::~TAO_Naming_Client (void) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Auto_Basic_Ptr<TAO_Naming_Context>; - template class TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex>; - template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex>; - template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> >; + template class TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX>; + template class ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX>; + template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Auto_Basic_Ptr<TAO_Naming_Context> - #pragma instantiate TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> - #pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> - #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Thread_Mutex> > + #pragma instantiate TAO_Persistent_Context_Index<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> + #pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> + #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_SYNCH_MUTEX> > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |