diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-15 18:28:47 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-15 18:28:47 +0000 |
commit | bb3e467d487cee1dd99b78941ac06b7c7745866b (patch) | |
tree | ab9ddcf5cc186a68365dbc1af40398af09d12816 /TAO | |
parent | f037c1a328bb6852361d313e53146e835a902116 (diff) | |
download | ATCD-bb3e467d487cee1dd99b78941ac06b7c7745866b.tar.gz |
ChangeLogTag:Thu Jul 15 13:11:02 1999 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-99c | 7 | ||||
-rw-r--r-- | TAO/tao/Object_Adapter.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Object_Adapter.h | 4 |
3 files changed, 14 insertions, 9 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index b339cbcfeea..5e051b0b4df 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,10 +1,15 @@ -Thu Jul 15 12:59:05 1999 Irfan Pyarali <irfan@cs.wustl.edu> +Thu Jul 15 13:11:02 1999 Irfan Pyarali <irfan@cs.wustl.edu> * tao/Object_Adapter.cpp (find_transient_poa): Changed use of ORB_Core::root_poa() such that an environment variable was passed to the function instead of it using the default environment. Thanks to Carlos for pointing this out. + Also, since setup() and teardown() are done in the same thread + of control, we can optimize away a call to + TAO_TSS_RESOURCES::instance() by caching a pointer to tss + resources. Thanks again to Carlos for pointing this out. + Thu Jul 15 13:00:09 1999 Jeff Parsons <parsons@cs.wustl.edu> * TAO_IDL/be/be_visitor_union/cdr_op_ci.cpp: diff --git a/TAO/tao/Object_Adapter.cpp b/TAO/tao/Object_Adapter.cpp index 705b74844f8..3984e9fc011 100644 --- a/TAO/tao/Object_Adapter.cpp +++ b/TAO/tao/Object_Adapter.cpp @@ -1027,11 +1027,10 @@ TAO_POA_Current_Impl::setup (TAO_POA *p, this->servant_ = servant; // Set the current context and remember the old one. - TAO_TSS_Resources *tss = - TAO_TSS_RESOURCES::instance (); + this->tss_resources_ = TAO_TSS_RESOURCES::instance (); - this->previous_current_impl_ = tss->poa_current_impl_; - tss->poa_current_impl_ = this; + this->previous_current_impl_ = this->tss_resources_->poa_current_impl_; + this->tss_resources_->poa_current_impl_ = this; // Setup is complete. this->setup_done_ = 1; @@ -1042,11 +1041,8 @@ TAO_POA_Current_Impl::teardown (void) { if (this->setup_done_) { - TAO_TSS_Resources *tss = - TAO_TSS_RESOURCES::instance (); - // Reset the old context. - tss->poa_current_impl_ = this->previous_current_impl_; + this->tss_resources_->poa_current_impl_ = this->previous_current_impl_; } } diff --git a/TAO/tao/Object_Adapter.h b/TAO/tao/Object_Adapter.h index 03582eff061..51c92ba14ef 100644 --- a/TAO/tao/Object_Adapter.h +++ b/TAO/tao/Object_Adapter.h @@ -44,6 +44,7 @@ class TAO_POA; class TAO_POA_Manager; class TAO_Temporary_Creation_Time; class TAO_POA_Current_Impl; +class TAO_TSS_Resources; class TAO_Export TAO_POA_Current : public POA_PortableServer::Current { @@ -162,6 +163,9 @@ protected: int setup_done_; // Is setup complete? + TAO_TSS_Resources *tss_resources_; + // Pointer to tss resources. + // = Hidden because we don't allow these TAO_POA_Current_Impl (const TAO_POA_Current_Impl &); void operator= (const TAO_POA_Current_Impl &); |