summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-06-23 12:38:27 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-06-23 12:38:27 +0000
commit2a61fbfddec2f4191dd4d066808a68130651dc1e (patch)
treed4cea5f1fc535b188fdd8df079078c14b0433fb4
parent5d3ee8d1b38cd82d3428f92a534b4308ef8d9158 (diff)
downloadATCD-2a61fbfddec2f4191dd4d066808a68130651dc1e.tar.gz
ChangeLogTag: Thu Jun 23 10:59:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/tao/ORB_Core.cpp40
-rw-r--r--TAO/tao/ORB_Core.h76
-rw-r--r--TAO/tao/ORB_Core_TSS_Resources.cpp37
-rw-r--r--TAO/tao/ORB_Core_TSS_Resources.h75
4 files changed, 115 insertions, 113 deletions
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index cc0ca1ade7b..32bb0c3ca20 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -1,6 +1,7 @@
// $Id$
#include "ORB_Core.h"
+#include "ORB_Core_TSS_Resources.h"
#include "ORB_Table.h"
#include "TAO_Internal.h"
#include "default_server.h"
@@ -3013,6 +3014,45 @@ TAO_ORB_Core::valuetype_adapter (void)
// ****************************************************************
+TAO_ORB_Core_TSS_Resources::TAO_ORB_Core_TSS_Resources (void)
+ : event_loop_thread_ (0)
+ , client_leader_thread_ (0)
+ , lane_ (0)
+ , ts_objects_ ()
+ , upcalls_temporarily_suspended_on_this_thread_ (false)
+ , orb_core_ (0)
+#if TAO_HAS_INTERCEPTORS == 1
+ , pi_current_ ()
+ , client_request_info_ (0)
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+{
+#if TAO_HAS_INTERCEPTORS == 1
+ ACE_NEW (this->client_request_info_,
+ TAO_ClientRequestInfo);
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+}
+
+TAO_ORB_Core_TSS_Resources::~TAO_ORB_Core_TSS_Resources (void)
+{
+
+#if TAO_HAS_INTERCEPTORS == 1
+ CORBA::release (this->client_request_info_);
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+ //@@ This is broken on platforms that use TSS emulation since this
+ // destructor is invoked after the ORB. Since we're under
+ // pressure to release a beta, we'll have to leak the TSS objects
+ // stores in the <ts_objects_> array. However, the only service
+ // known to currently use this array is the SSLIOP pluggable
+ // protocol. Fortunately, it registeres a null cleanup function
+ // so we're not leaking anything yet. We *do* need to fix this
+ // before other services start to use this array.
+ // -Ossama
+ // if (this->orb_core_ != 0)
+ // this->orb_core_->tss_cleanup_funcs ()->cleanup (this->ts_objects_);
+}
+
+
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Lock_Adapter<ACE_Null_Mutex>;
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index ea0e534c2f8..338e037f8fa 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -60,6 +60,7 @@ namespace TAO
#include "ace/Thread_Manager.h"
#include "ace/Lock_Adapter_T.h"
+#include "ace/TSS_T.h"
// Forward declarations
class TAO_Adapter;
@@ -71,7 +72,6 @@ class TAO_Resource_Factory;
class TAO_Client_Strategy_Factory;
class TAO_Server_Strategy_Factory;
-class TAO_ORB_Core_TSS_Resources;
class TAO_TSS_Resources;
class TAO_Leader_Follower;
class TAO_LF_Strategy;
@@ -142,6 +142,80 @@ namespace PortableInterceptor
typedef IORInterceptor *IORInterceptor_ptr;
}
+class TAO_ORB_Core;
+
+#if TAO_HAS_INTERCEPTORS == 1
+#include "PICurrent_Impl.h"
+class TAO_ClientRequestInfo;
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+/**
+ * @class TAO_ORB_Core_TSS_Resources
+ *
+ * @brief The TSS resoures of an ORB core.
+ *
+ * This class is used by the ORB_Core to store the resources
+ * potentially bound to a thread in TSS storage. The members are public
+ * because only the ORB Core is expected to access them.
+ */
+class TAO_Export TAO_ORB_Core_TSS_Resources
+{
+public:
+
+ /// Constructor
+ TAO_ORB_Core_TSS_Resources (void);
+
+ /// destructor
+ ~TAO_ORB_Core_TSS_Resources (void);
+
+private:
+
+ /// The ORB Core TSS resources should not be copied
+ TAO_ORB_Core_TSS_Resources (const TAO_ORB_Core_TSS_Resources&);
+ void operator= (const TAO_ORB_Core_TSS_Resources&);
+
+public:
+
+ /**
+ * @todo
+ * The rest of the resources are not currently in use, just a plan
+ * for the future...
+ */
+ /// Counter for how (nested) calls this thread has made to run the
+ /// event loop.
+ int event_loop_thread_;
+
+ /// Counter for how many times this thread has become a client
+ /// leader.
+ int client_leader_thread_;
+
+ /// Lane for this thread.
+ void *lane_;
+
+ /// Generic container for thread-specific objects.
+ ACE_Array_Base<void *> ts_objects_;
+
+ // Set to true by the wait_on_lf_no_nested_upcall wait strategy
+ // @CJC@ maybe we should use allocate_tss_slot_id() instead?
+ bool upcalls_temporarily_suspended_on_this_thread_;
+
+ /// Pointer to the ORB core. Needed to get access to the TSS
+ /// cleanup functions for the TSS objects stored in the TSS object
+ /// array in this class.
+ TAO_ORB_Core *orb_core_;
+
+#if TAO_HAS_INTERCEPTORS == 1
+ /// The thread-specific portion of the PICurrent object.
+ TAO::PICurrent_Impl pi_current_;
+
+ /// The PortableInterceptor::ClientRequestInfo object for the
+ /// current thread.
+ TAO_ClientRequestInfo *client_request_info_;
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+};
+
+
+
// ****************************************************************
/**
* @class TAO_ORB_Core
diff --git a/TAO/tao/ORB_Core_TSS_Resources.cpp b/TAO/tao/ORB_Core_TSS_Resources.cpp
index 6e7e3606df5..8e4b2351f85 100644
--- a/TAO/tao/ORB_Core_TSS_Resources.cpp
+++ b/TAO/tao/ORB_Core_TSS_Resources.cpp
@@ -2,41 +2,4 @@
#include "ORB_Core_TSS_Resources.h"
-TAO_ORB_Core_TSS_Resources::TAO_ORB_Core_TSS_Resources (void)
- : event_loop_thread_ (0)
- , client_leader_thread_ (0)
- , lane_ (0)
- , ts_objects_ ()
- , upcalls_temporarily_suspended_on_this_thread_ (false)
- , orb_core_ (0)
-#if TAO_HAS_INTERCEPTORS == 1
- , pi_current_ ()
- , client_request_info_ (0)
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-{
-#if TAO_HAS_INTERCEPTORS == 1
- ACE_NEW (this->client_request_info_,
- TAO_ClientRequestInfo);
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-}
-
-TAO_ORB_Core_TSS_Resources::~TAO_ORB_Core_TSS_Resources (void)
-{
-
-#if TAO_HAS_INTERCEPTORS == 1
- CORBA::release (this->client_request_info_);
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
- //@@ This is broken on platforms that use TSS emulation since this
- // destructor is invoked after the ORB. Since we're under
- // pressure to release a beta, we'll have to leak the TSS objects
- // stores in the <ts_objects_> array. However, the only service
- // known to currently use this array is the SSLIOP pluggable
- // protocol. Fortunately, it registeres a null cleanup function
- // so we're not leaking anything yet. We *do* need to fix this
- // before other services start to use this array.
- // -Ossama
- // if (this->orb_core_ != 0)
- // this->orb_core_->tss_cleanup_funcs ()->cleanup (this->ts_objects_);
-}
diff --git a/TAO/tao/ORB_Core_TSS_Resources.h b/TAO/tao/ORB_Core_TSS_Resources.h
index adc0298f738..8ea650c9b6f 100644
--- a/TAO/tao/ORB_Core_TSS_Resources.h
+++ b/TAO/tao/ORB_Core_TSS_Resources.h
@@ -24,80 +24,5 @@
#include "ace/Array_Base.h"
-
-#include "ace/Array_Base.h"
-
-class TAO_ORB_Core;
-
-#if TAO_HAS_INTERCEPTORS == 1
-#include "PICurrent_Impl.h"
-class TAO_ClientRequestInfo;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-
-/**
- * @class TAO_ORB_Core_TSS_Resources
- *
- * @brief The TSS resoures of an ORB core.
- *
- * This class is used by the ORB_Core to store the resources
- * potentially bound to a thread in TSS storage. The members are public
- * because only the ORB Core is expected to access them.
- */
-class TAO_Export TAO_ORB_Core_TSS_Resources
-{
-public:
-
- /// Constructor
- TAO_ORB_Core_TSS_Resources (void);
-
- /// destructor
- ~TAO_ORB_Core_TSS_Resources (void);
-
-private:
-
- /// The ORB Core TSS resources should not be copied
- TAO_ORB_Core_TSS_Resources (const TAO_ORB_Core_TSS_Resources&);
- void operator= (const TAO_ORB_Core_TSS_Resources&);
-
-public:
-
- /**
- * @todo
- * The rest of the resources are not currently in use, just a plan
- * for the future...
- */
- /// Counter for how (nested) calls this thread has made to run the
- /// event loop.
- int event_loop_thread_;
-
- /// Counter for how many times this thread has become a client
- /// leader.
- int client_leader_thread_;
-
- /// Lane for this thread.
- void *lane_;
-
- /// Generic container for thread-specific objects.
- ACE_Array_Base<void *> ts_objects_;
-
- // Set to true by the wait_on_lf_no_nested_upcall wait strategy
- // @CJC@ maybe we should use allocate_tss_slot_id() instead?
- bool upcalls_temporarily_suspended_on_this_thread_;
-
- /// Pointer to the ORB core. Needed to get access to the TSS
- /// cleanup functions for the TSS objects stored in the TSS object
- /// array in this class.
- TAO_ORB_Core *orb_core_;
-
-#if TAO_HAS_INTERCEPTORS == 1
- /// The thread-specific portion of the PICurrent object.
- TAO::PICurrent_Impl pi_current_;
-
- /// The PortableInterceptor::ClientRequestInfo object for the
- /// current thread.
- TAO_ClientRequestInfo *client_request_info_;
-#endif /* TAO_HAS_INTERCEPTORS == 1 */
-};
-
#include /**/ "ace/post.h"
#endif /* TAO_ORB_CORE_H */