diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-06 17:48:50 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-06 17:48:50 +0000 |
commit | 229da3f94cdda5a4e9b8fd3ee7539d5341d16121 (patch) | |
tree | f21f1f38041cff55b581133f4250f33c54673e5c | |
parent | 5bd0eb6cd2451f0b38efb2650d1616f3a2cbf19a (diff) | |
download | ATCD-229da3f94cdda5a4e9b8fd3ee7539d5341d16121.tar.gz |
ChangeLogTag:Tue Jul 6 09:55:42 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r-- | TAO/tao/Transport_Mux_Strategy.cpp | 20 | ||||
-rw-r--r-- | TAO/tao/Transport_Mux_Strategy.h | 5 |
2 files changed, 15 insertions, 10 deletions
diff --git a/TAO/tao/Transport_Mux_Strategy.cpp b/TAO/tao/Transport_Mux_Strategy.cpp index 57e61f04aff..b18471fb17a 100644 --- a/TAO/tao/Transport_Mux_Strategy.cpp +++ b/TAO/tao/Transport_Mux_Strategy.cpp @@ -162,7 +162,9 @@ TAO_Muxed_TMS::~TAO_Muxed_TMS (void) CORBA::ULong TAO_Muxed_TMS::request_id (void) { - // @@ I am sure we need lock for this in the MT case. (Alex). + // @@ What is a good error return value? + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, + this->request_id_lock_, 0); return this->request_id_generator_++; } @@ -282,7 +284,7 @@ template class ACE_Hash_Map_Manager_Ex <CORBA::ULong, TAO_Reply_Dispatcher *, ACE_Hash <CORBA::ULong>, ACE_Equal_To <CORBA::ULong>, - ACE_Null_Mutex>; + ACE_SYNCH_MUTEX>; template class ACE_Hash_Map_Entry<CORBA::ULong, TAO_Reply_Dispatcher *>; @@ -291,19 +293,19 @@ template class ACE_Hash_Map_Iterator_Base_Ex<CORBA::ULong, TAO_Reply_Dispatcher *, ACE_Hash<unsigned int>, ACE_Equal_To<unsigned int>, - ACE_Null_Mutex>; + ACE_SYNCH_MUTEX>; template class ACE_Hash_Map_Iterator_Ex<CORBA::ULong, TAO_Reply_Dispatcher*, ACE_Hash<CORBA::ULong>, ACE_Equal_To<CORBA::ULong>, - ACE_Null_Mutex>; + ACE_SYNCH_MUTEX>; template class ACE_Hash_Map_Reverse_Iterator_Ex<CORBA::ULong, TAO_Reply_Dispatcher*, ACE_Hash<CORBA::ULong>, ACE_Equal_To<CORBA::ULong>, - ACE_Null_Mutex>; + ACE_SYNCH_MUTEX>; template class ACE_Equal_To <CORBA::ULong>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) @@ -311,7 +313,7 @@ template class ACE_Equal_To <CORBA::ULong>; TAO_Reply_Dispatcher *, ACE_Hash <CORBA::ULong>, ACE_Equal_To <CORBA::ULong>, - ACE_Null_Mutex> + ACE_SYNCH_MUTEX> #pragma instantiate ACE_Hash_Map_Entry<CORBA::ULong, TAO_Reply_Dispatcher *> @@ -320,19 +322,19 @@ template class ACE_Equal_To <CORBA::ULong>; TAO_Reply_Dispatcher *, ACE_Hash<unsigned int>, ACE_Equal_To<unsigned int>, - ACE_Null_Mutex> + ACE_SYNCH_MUTEX> #pragma instantiate ACE_Hash_Map_Iterator_Ex<CORBA::ULong, TAO_Reply_Dispatcher*, ACE_Hash<CORBA::ULong>, ACE_Equal_To<CORBA::ULong>, - ACE_Null_Mutex> + ACE_SYNCH_MUTEX> #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<CORBA::ULong, TAO_Reply_Dispatcher*, ACE_Hash<CORBA::ULong>, ACE_Equal_To<CORBA::ULong>, - ACE_Null_Mutex> + ACE_SYNCH_MUTEX> #pragma instantiate ACE_Equal_To <CORBA::ULong> diff --git a/TAO/tao/Transport_Mux_Strategy.h b/TAO/tao/Transport_Mux_Strategy.h index 73e60d2081b..1a638aad3f2 100644 --- a/TAO/tao/Transport_Mux_Strategy.h +++ b/TAO/tao/Transport_Mux_Strategy.h @@ -217,11 +217,14 @@ protected: // Used to generate a different request_id on each call to // request_id(). + ACE_SYNCH_MUTEX request_id_lock_; + // Lock to protect the state of the request id generator. + typedef ACE_Hash_Map_Manager_Ex <CORBA::ULong, TAO_Reply_Dispatcher *, ACE_Hash <CORBA::ULong>, ACE_Equal_To <CORBA::ULong>, - ACE_Null_Mutex> REQUEST_DISPATCHER_TABLE; + ACE_SYNCH_MUTEX> REQUEST_DISPATCHER_TABLE; REQUEST_DISPATCHER_TABLE dispatcher_table_; // Table of <Request ID, Reply Dispatcher> pairs. |