summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-01-18 15:47:16 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-01-18 15:47:16 +0000
commit729178bff47d7810c98b38535cfeef27d65fc627 (patch)
tree3821ac2bd24737324eb5271d4e65004230bbcd1a
parent08325a6559f2f3d148f552bddc79ed863fe2e526 (diff)
downloadATCD-729178bff47d7810c98b38535cfeef27d65fc627.tar.gz
ChangeLogTag: Sat Jan 18 10:40:58 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/tao/Muxed_TMS.cpp22
-rw-r--r--TAO/tao/Muxed_TMS.h8
-rw-r--r--TAO/tao/orbconf.h7
4 files changed, 39 insertions, 9 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 75068d9b7c3..3094eec3180 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Sat Jan 18 10:40:58 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
+
+ * tao/orbconf.h: Added TAO_RD_TABLE_SIZE and set the value to be
+ 16.
+
+ * tao/Muxed_TMS.cpp:
+ * tao/Muxed_TMS.h: Used the TAO_RD_TABLE_SIZE to configure the
+ internal hash map. This is now hard coded. We should have a way
+ for the user to configure the size of these hash maps and it will
+ be integrated after 1.3.2.
+
Sat Jan 18 09:08:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
* TAO_IDL/Makefile.BE:
diff --git a/TAO/tao/Muxed_TMS.cpp b/TAO/tao/Muxed_TMS.cpp
index 62e933ada9f..62318675be5 100644
--- a/TAO/tao/Muxed_TMS.cpp
+++ b/TAO/tao/Muxed_TMS.cpp
@@ -7,6 +7,8 @@
#include "tao/debug.h"
#include "tao/Pluggable_Messaging_Utils.h"
#include "Transport.h"
+#include "ORB_Core.h"
+#include "Client_Strategy_Factory.h"
ACE_RCSID(tao, Muxed_TMS, "$Id$")
@@ -14,7 +16,8 @@ ACE_RCSID(tao, Muxed_TMS, "$Id$")
TAO_Muxed_TMS::TAO_Muxed_TMS (TAO_Transport *transport)
: TAO_Transport_Mux_Strategy (transport),
request_id_generator_ (0),
- orb_core_ (transport->orb_core ())
+ orb_core_ (transport->orb_core ()),
+ dispatcher_table_ (TAO_RD_TABLE_SIZE)
{
}
@@ -60,8 +63,12 @@ int
TAO_Muxed_TMS::bind_dispatcher (CORBA::ULong request_id,
TAO_Reply_Dispatcher *rd)
{
-
- int result = this->dispatcher_table_.bind (request_id, rd);
+ // NOTE: The most dangerous form of code. At the outset one would
+ // think that there is a race here since we are not using the
+ // lock. But no, there is a implicit synhronization since only one
+ // thread can be active on this path.
+ int result =
+ this->dispatcher_table_.bind (request_id, rd);
if (result != 0)
{
@@ -99,8 +106,13 @@ TAO_Muxed_TMS::dispatch_reply (TAO_Pluggable_Reply_Params &params)
// Grab the reply dispatcher for this id.
{
- ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, ace_mon, this->lock_, -1);
- result = this->dispatcher_table_.unbind (params.request_id_, rd);
+ ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
+ ace_mon,
+ this->lock_,
+ -1);
+
+ result =
+ this->dispatcher_table_.unbind (params.request_id_, rd);
if (TAO_debug_level > 8)
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/tao/Muxed_TMS.h b/TAO/tao/Muxed_TMS.h
index 893d06440eb..5b862542812 100644
--- a/TAO/tao/Muxed_TMS.h
+++ b/TAO/tao/Muxed_TMS.h
@@ -71,6 +71,10 @@ protected:
/// request_id().
CORBA::ULong request_id_generator_;
+ /// Keep track of the orb core pointer. We need to this to create the
+ /// Reply Dispatchers.
+ TAO_ORB_Core *orb_core_;
+
typedef ACE_Hash_Map_Manager_Ex <CORBA::ULong,
TAO_Reply_Dispatcher *,
ACE_Hash <CORBA::ULong>,
@@ -79,10 +83,6 @@ protected:
/// Table of <Request ID, Reply Dispatcher> pairs.
REQUEST_DISPATCHER_TABLE dispatcher_table_;
-
- /// Keep track of the orb core pointer. We need to this to create the
- /// Reply Dispatchers.
- TAO_ORB_Core *orb_core_;
};
#include "ace/post.h"
diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h
index d63799a2a1e..02450609428 100644
--- a/TAO/tao/orbconf.h
+++ b/TAO/tao/orbconf.h
@@ -72,6 +72,13 @@
const size_t TAO_DEFAULT_ORB_TABLE_SIZE = 16;
#endif /* !TAO_DEFAULT_ORB_TABLE_SIZE */
+// The default size of the reply dispatcher table, ie. if the reply
+// dispatcher strategy needs a table to maintain association between
+// request id's and reply dispatchers
+#if !defined (TAO_RD_TABLE_SIZE)
+const size_t TAO_RD_TABLE_SIZE = 16;
+#endif /* !TAO_RD_TABLE_SIZE */
+
// The default size of TAO's policy factory registry, i.e. the map
// used as the underlying implementation for the
// PortableInterceptor::ORBInitInfo::register_policy_factory() method.