diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-13 00:32:20 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-09-13 00:32:20 +0000 |
commit | 5d74db27100e5d66151e5d6316ca5f1e4eea7435 (patch) | |
tree | 915badbcb621cc695999db27604d5fe0efef1f6a | |
parent | d39a3356c546085b61d4c0a83d24fa50b8ffc69c (diff) | |
download | ATCD-5d74db27100e5d66151e5d6316ca5f1e4eea7435.tar.gz |
This commit was manufactured by cvs2svn to create branch
'Thread_Pool_stage_3'.
24 files changed, 0 insertions, 1568 deletions
diff --git a/TAO/tao/POA_Extension_Initializer.cpp b/TAO/tao/POA_Extension_Initializer.cpp deleted file mode 100644 index fcfc5440c8d..00000000000 --- a/TAO/tao/POA_Extension_Initializer.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// $Id$ - -#include "POA_Extension_Initializer.h" -#include "Environment.h" - -ACE_RCSID(tao, TAO_POA_Extension_Initializer, "$Id$") - -TAO_POA_Extension_Initializer::TAO_POA_Extension_Initializer (void) - : next_ (0) -{ - // No-Op. -} - -TAO_POA_Extension_Initializer::~TAO_POA_Extension_Initializer (void) -{ - delete this->next_; -} - -void -TAO_POA_Extension_Initializer::add_initializer (TAO_POA_Extension_Initializer *initializer) -{ - if (this->next_ == 0) - this->next_ = initializer; - else - { - initializer->next_ = this->next_; - this->next_ = initializer; - } -} - -void -TAO_POA_Extension_Initializer::register_hooks (TAO_Object_Adapter &object_adapter, - CORBA::Environment &ACE_TRY_ENV) -{ - this->register_hooks_impl (object_adapter, ACE_TRY_ENV); - ACE_CHECK; - - if (this->next_ != 0) - { - this->next_->register_hooks (object_adapter, ACE_TRY_ENV); - ACE_CHECK; - } -} - diff --git a/TAO/tao/POA_Extension_Initializer.h b/TAO/tao/POA_Extension_Initializer.h deleted file mode 100644 index ee926c917c0..00000000000 --- a/TAO/tao/POA_Extension_Initializer.h +++ /dev/null @@ -1,60 +0,0 @@ -// -*- C++ -*- - -// =================================================================== -/** - * @file POA_Extension_Initializer.h - * - * $Id$ - * - * @author Frank Hunleth <fhunleth@cs.wustl.edu> - * @author Angelo Corsaro <corsaro@cs.wustl.edu> - */ -// =================================================================== - -#ifndef TAO_POA_EXTENSION_INITIALIZER_H -#define TAO_POA_EXTENSION_INITIALIZER_H -#include "ace/pre.h" - -#include "corbafwd.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Forward reference. -class TAO_Object_Adapter; - -class TAO_Export TAO_POA_Extension_Initializer -{ -public: - /// Constructor. - TAO_POA_Extension_Initializer (void); - - /// Destructor. - virtual ~TAO_POA_Extension_Initializer (void); - - /** - * Called at POA initialization for libraries to register their - * POA extensions with the POA. - */ - void register_hooks (TAO_Object_Adapter &object_adapter, - CORBA::Environment &ACE_TRY_ENV); - - /** - * Adds an initializer to the "chain of initializers". This is used - * to reduce the footprint of the ORB core that would have been needed - * to store a variable length list of POA extension initializers. - */ - void add_initializer (TAO_POA_Extension_Initializer *initializer); - -protected: - - virtual void register_hooks_impl (TAO_Object_Adapter &object_adapter, - CORBA::Environment &ACE_TRY_ENV) = 0; - -private: - TAO_POA_Extension_Initializer *next_; -}; - -#include "ace/post.h" -#endif /* TAO_POA_EXTENSION_INITIALIZER_H */ diff --git a/TAO/tao/RTCORBA/Pool_Per_Endpoint.cpp b/TAO/tao/RTCORBA/Pool_Per_Endpoint.cpp deleted file mode 100644 index 5a926b83ed4..00000000000 --- a/TAO/tao/RTCORBA/Pool_Per_Endpoint.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// $Id$ - -#include "Pool_Per_Endpoint.h" -#include "tao/ORB.h" -#include "tao/ORB_Core.h" -#include "tao/Acceptor_Registry.h" -#include "tao/Pluggable.h" -#include "Priority_Mapping_Manager.h" -#include "tao/debug.h" -#include "ace/Sched_Params.h" - -#if !defined (__ACE_INLINE__) -# include "Pool_Per_Endpoint.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(tao, Pool_Per_Endpoint, "$Id$") - -TAO_Pool_Per_Endpoint::TAO_Pool_Per_Endpoint (CORBA::ORB_ptr orb, - int policy, - int poolsize, - int flags) - : orb_ (CORBA::ORB::_duplicate (orb)), - policy_ (policy), - poolsize_ (poolsize), - flags_ (flags) -{ - this->thr_mgr (&this->thread_manager_); -} - -TAO_Pool_Per_Endpoint::~TAO_Pool_Per_Endpoint (void) -{ -} - -void -TAO_Pool_Per_Endpoint::run (CORBA::Environment &ACE_TRY_ENV) -{ - CORBA::Object_var obj = - this->orb_->resolve_initial_references (TAO_OBJID_PRIORITYMAPPINGMANAGER, - ACE_TRY_ENV); - - TAO_Priority_Mapping_Manager_var mapping_manager = - TAO_Priority_Mapping_Manager::_narrow (obj.in (), - ACE_TRY_ENV); - ACE_CHECK; - - RTCORBA::PriorityMapping *pm = - mapping_manager.in ()->mapping (); - - TAO_Acceptor_Registry *ac = - this->orb_->orb_core ()->acceptor_registry (); - - for (TAO_AcceptorSetIterator i = ac->begin (); i != ac->end (); ++i) - { - int priority = - ACE_Sched_Params::priority_min (this->policy_); - - const CORBA::Short corba_priority = (*i)->priority (); - CORBA::Short native_priority; - if (pm->to_native (corba_priority, native_priority) == 1) - priority = native_priority; - else - ACE_THROW (CORBA::DATA_CONVERSION ()); - - if (TAO_debug_level > 3) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - creating thread at ") - ACE_TEXT ("priority %d:%d\n"), - priority, - corba_priority)); - - if (this->activate (this->flags_, - this->poolsize_, /* number of threads */ - 1, /* force active */ - priority) == -1) - { - ACE_THROW (CORBA::INTERNAL ()); - } - } - this->thread_manager_.wait (); -} - -int -TAO_Pool_Per_Endpoint::svc (void) -{ - if (TAO_debug_level > 3) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - TAO_Pool_Per_Endpoint::svc: ") - ACE_TEXT (" using reactor <%x> in this thread\n"), - this->orb_->orb_core ()->reactor ())); - - this->orb_->run (); // @@ Where's the error/exception check? - - if (TAO_debug_level > 3) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - TAO_Pool_Per_Endpoint::svc: ") - ACE_TEXT (" ORB::run() finished\n"))); - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/RTCORBA/Pool_Per_Endpoint.h b/TAO/tao/RTCORBA/Pool_Per_Endpoint.h deleted file mode 100644 index 34478d5dae1..00000000000 --- a/TAO/tao/RTCORBA/Pool_Per_Endpoint.h +++ /dev/null @@ -1,79 +0,0 @@ - -//============================================================================= -/** - * @file Pool_Per_Endpoint.h - * - * $Id$ - * - * @author Carlos O'Ryan (coryan@cs.wustl.edu) - */ -//============================================================================= - - -#ifndef TAO_POOL_PER_ENDPOINT_H -#define TAO_POOL_PER_ENDPOINT_H -#include "ace/pre.h" - -#include "rtcorba_export.h" -#include "tao/ORB.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Task.h" - -/** - * @class TAO_Pool_Per_Endpoint - * - * @brief The Pool_Per_Endpoint concurrency strategy. - * - * This strategy creates a separate thread pool for each endpoint - * in the system. It is a helper class to manage and create the - * required threads. - * It should be used with the Reactor_Per_Endpoint registry - * configured. - */ -class TAO_RTCORBA_Export TAO_Pool_Per_Endpoint : public ACE_Task_Base -{ -public: - /// Constructor - TAO_Pool_Per_Endpoint (CORBA::ORB_ptr orb, - int policy = ACE_SCHED_OTHER, - int poolsize = 1, - int flags = - THR_BOUND|THR_NEW_LWP|THR_JOINABLE); - - /// The destructor - virtual ~TAO_Pool_Per_Endpoint (void); - - /// Run all the threads and wait until they finish - void run (CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()); - - // = The Task_Base entry point - int svc (void); - -private: - /// The ORB. - CORBA::ORB_var orb_; - - /// The scheduling policy to activate the threads. - int policy_; - - /// The number of threads on each pool. - int poolsize_; - - /// The flags used to create the threads - int flags_; - - /// The thread manager. - ACE_Thread_Manager thread_manager_; -}; - -#if defined (__ACE_INLINE__) -# include "Pool_Per_Endpoint.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_POOL_PER_ENDPOINT_H */ diff --git a/TAO/tao/RTCORBA/Pool_Per_Endpoint.i b/TAO/tao/RTCORBA/Pool_Per_Endpoint.i deleted file mode 100644 index cfa1da318d3..00000000000 --- a/TAO/tao/RTCORBA/Pool_Per_Endpoint.i +++ /dev/null @@ -1 +0,0 @@ -// $Id$ diff --git a/TAO/tao/RTPortableServer/RT_POA_Initializer.cpp b/TAO/tao/RTPortableServer/RT_POA_Initializer.cpp deleted file mode 100644 index d2b0c9bcfa2..00000000000 --- a/TAO/tao/RTPortableServer/RT_POA_Initializer.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// $Id$ - -#include "RT_POA_Initializer.h" -#include "RT_Servant_Dispatcher.h" -#include "RT_Policy_Validator.h" - -#include "tao/PortableServer/Object_Adapter.h" - -#include "tao/ORB_Core.h" - -ACE_RCSID(tao, RT_POA_Initializer, "$Id$") - -TAO_RT_POA_Initializer::~TAO_RT_POA_Initializer (void) -{ -} - -void -TAO_RT_POA_Initializer::register_hooks_impl (TAO_Object_Adapter &object_adapter, - CORBA::Environment &ACE_TRY_ENV) -{ - // Create and register the RT servant dispatcher. - TAO_RT_Servant_Dispatcher *rt_servant_dispatcher; - ACE_NEW (rt_servant_dispatcher, - TAO_RT_Servant_Dispatcher); - object_adapter.servant_dispatcher (rt_servant_dispatcher); - - // Create and add the RT policy validator. - TAO_POA_RT_Policy_Validator *rt_validator; - ACE_NEW (rt_validator, - TAO_POA_RT_Policy_Validator (&object_adapter.orb_core ())); - - object_adapter.validator ().add_validator (rt_validator); - - // Add the default RT policies to the list of default POA policies. - this->init_rt_default_policies (object_adapter.default_poa_policies (), - object_adapter.orb_core (), - ACE_TRY_ENV); - -} - -void -TAO_RT_POA_Initializer::init_rt_default_policies (TAO_POA_Policy_Set &policies, - TAO_ORB_Core &orb_core, - CORBA::Environment &ACE_TRY_ENV) -{ - CORBA::Policy_var policy = - orb_core.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL); - if (!CORBA::is_nil (policy.in ())) - { - policies.merge_policy (policy.in (), ACE_TRY_ENV); - ACE_CHECK; - } - - CORBA::Policy_var protocol = - orb_core.get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL); - if (!CORBA::is_nil (protocol.in ())) - { - policies.merge_policy (protocol.in (), ACE_TRY_ENV); - ACE_CHECK; - } -} - diff --git a/TAO/tao/RTPortableServer/RT_POA_Initializer.h b/TAO/tao/RTPortableServer/RT_POA_Initializer.h deleted file mode 100644 index 1a48039fa0b..00000000000 --- a/TAO/tao/RTPortableServer/RT_POA_Initializer.h +++ /dev/null @@ -1,47 +0,0 @@ -// -*- C++ -*- - -// =================================================================== -/** - * @file RT_POA_Initializer.h - * - * $Id$ - * - * @author Frank Hunleth <fhunleth@cs.wustl.edu> - * @author Angelo Corsaro <corsaro@cs.wustl.edu> - */ -// =================================================================== - -#ifndef TAO_RT_POA_INITIALIZER_H -#define TAO_RT_POA_INITIALIZER_H -#include "ace/pre.h" - -#include "rtportableserver_export.h" -#include "tao/POA_Extension_Initializer.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Forward declarations. -class TAO_POA_Policy_Set; -class TAO_ORB_Core; - -class TAO_RTPortableServer_Export TAO_RT_POA_Initializer - : public TAO_POA_Extension_Initializer -{ -public: - /// Destructor. - virtual ~TAO_RT_POA_Initializer (void); - -protected: - - virtual void register_hooks_impl (TAO_Object_Adapter &object_adapter, - CORBA::Environment &ACE_TRY_ENV); - - void init_rt_default_policies (TAO_POA_Policy_Set &policies, - TAO_ORB_Core &orb_core, - CORBA::Environment &ACE_TRY_ENV); -}; - -#include "ace/post.h" -#endif /* TAO_RT_POA_INITIALIZER_H */ diff --git a/TAO/tao/Reactor_Registry.cpp b/TAO/tao/Reactor_Registry.cpp deleted file mode 100644 index f707ca1e1bf..00000000000 --- a/TAO/tao/Reactor_Registry.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ - -#include "tao/Reactor_Registry.h" -#include "tao/ORB_Core.h" -#include "tao/Leader_Follower.h" -#include "tao/LF_Strategy.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Reactor_Registry.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(tao, Reactor_Registry, "$Id$") - -TAO_Reactor_Registry::TAO_Reactor_Registry (void) - : orb_core_ (0) - , lf_strategy_ (0) -{ -} - -void -TAO_Reactor_Registry::open (TAO_ORB_Core* orb_core) -{ - this->orb_core_ = orb_core; - - this->lf_strategy_ = orb_core->resource_factory ()->create_lf_strategy (); -} - -TAO_Reactor_Registry::~TAO_Reactor_Registry (void) -{ - delete this->lf_strategy_; -} - - -TAO_LF_Strategy & -TAO_Reactor_Registry::lf_strategy (void) -{ - return *this->lf_strategy_; -} diff --git a/TAO/tao/Reactor_Registry.h b/TAO/tao/Reactor_Registry.h deleted file mode 100644 index 3b877541b06..00000000000 --- a/TAO/tao/Reactor_Registry.h +++ /dev/null @@ -1,92 +0,0 @@ - -//============================================================================= -/** - * @file Reactor_Registry.h - * - * $Id$ - * - * @author Carlos O'Ryan (coryan@cs.wustl.edu) - */ -//============================================================================= - - -#ifndef TAO_REACTOR_REGISTRY_H -#define TAO_REACTOR_REGISTRY_H -#include "ace/pre.h" - -#include "tao/corbafwd.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class TAO_ORB_Core; -class TAO_Leader_Follower; -class TAO_LF_Strategy; -class TAO_Acceptor; -class ACE_Reactor; - -/** - * @class TAO_Reactor_Registry - * - * @brief The interface for the concurrency strategy. - * - * The ORB concurrency strategy is responsible for assigning - * reactors to threads, keeping the relationship between threads - * and their leader-follower groups and activating (if required) - * the server-side Svc_Handlers. - */ -class TAO_Export TAO_Reactor_Registry -{ -public: - /// Default constructor - TAO_Reactor_Registry (void); - - /// The destructor - virtual ~TAO_Reactor_Registry (void); - - /// The ORB core for this concurrency strategy. - TAO_ORB_Core *orb_core (void) const; - - /// Initialize the Reactor Registry - virtual void open (TAO_ORB_Core *orb_core); - - /// Return the reactor for the current thread - virtual ACE_Reactor *reactor (void) = 0; - - /// Return the reactor for a given acceptor - virtual ACE_Reactor *reactor (TAO_Acceptor *acceptor) = 0; - - /// Return the Leader-Follower group for the current thread - virtual TAO_Leader_Follower &leader_follower (void) = 0; - - /// Return the leader follower strategy - virtual TAO_LF_Strategy &lf_strategy (void); - - /// Return the Leader-Follower group for a given acceptor - virtual TAO_Leader_Follower &leader_follower (TAO_Acceptor *acceptor) = 0; - - /** - * The strategy is allowed to store TSS resources using a - * place-holder in the ORB_Core class. The ORB_Core the calls back - * to do the final cleanup. - */ - virtual void destroy_tss_cookie (void* cookie) = 0; - - /// Wakeup all the reactors - virtual int shutdown_all (void) = 0; - -private: - /// The orb_core - TAO_ORB_Core *orb_core_; - - /// The leader follower strategy - TAO_LF_Strategy *lf_strategy_; -}; - -#if defined (__ACE_INLINE__) -# include "tao/Reactor_Registry.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_REACTOR_REGISTRY_H */ diff --git a/TAO/tao/Reactor_Registry.i b/TAO/tao/Reactor_Registry.i deleted file mode 100644 index 23578dce586..00000000000 --- a/TAO/tao/Reactor_Registry.i +++ /dev/null @@ -1,8 +0,0 @@ -// $Id$ - -ACE_INLINE TAO_ORB_Core * -TAO_Reactor_Registry::orb_core (void) const -{ - return this->orb_core_; -} - diff --git a/TAO/tao/Single_Reactor.cpp b/TAO/tao/Single_Reactor.cpp deleted file mode 100644 index 242f11526f1..00000000000 --- a/TAO/tao/Single_Reactor.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// $Id$ - -#include "tao/Single_Reactor.h" -#include "tao/ORB_Core.h" -#include "tao/Resource_Factory.h" -#include "tao/Leader_Follower.h" -#include "ace/Reactor.h" - -#if !defined (__ACE_INLINE__) -# include "tao/Single_Reactor.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(tao, Single_Reactor, "$Id$") - -TAO_Single_Reactor::~TAO_Single_Reactor (void) -{ - delete this->leader_follower_; -} - -void -TAO_Single_Reactor::open (TAO_ORB_Core *orb_core) -{ - this->TAO_Reactor_Registry::open (orb_core); - ACE_NEW (this->leader_follower_, - TAO_Leader_Follower (this->orb_core ())); -} - -ACE_Reactor * -TAO_Single_Reactor::reactor (void) -{ - return this->leader_follower_->reactor (); -} - -ACE_Reactor * -TAO_Single_Reactor::reactor (TAO_Acceptor *) -{ - return this->reactor (); -} - -TAO_Leader_Follower & -TAO_Single_Reactor::leader_follower (void) -{ - return *this->leader_follower_; -} - -TAO_Leader_Follower & -TAO_Single_Reactor::leader_follower (TAO_Acceptor *) -{ - return *this->leader_follower_; -} - -void -TAO_Single_Reactor::destroy_tss_cookie (void*) -{ -} - -int -TAO_Single_Reactor::shutdown_all (void) -{ - TAO_Leader_Follower &leader_follower = - this->leader_follower (); - - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, - ace_mon, - leader_follower.lock (), - -1); - - // Wakeup all the threads waiting blocked in the event loop, this - // does not guarantee that they will all go away, but reduces the - // load on the POA.... - ACE_Reactor *reactor = - this->reactor (); - - reactor->wakeup_all_threads (); - - // If there are some client threads running we have to wait until - // they finish, when the last one does it will shutdown the - // reactor for us. Meanwhile no new requests will be accepted - // because the POA will not process them. - - if (!leader_follower.has_clients ()) - { - // Wake up all waiting threads in the reactor. - reactor->end_reactor_event_loop (); - } - - return 0; -} diff --git a/TAO/tao/Single_Reactor.h b/TAO/tao/Single_Reactor.h deleted file mode 100644 index 7cb88d60a8b..00000000000 --- a/TAO/tao/Single_Reactor.h +++ /dev/null @@ -1,65 +0,0 @@ - -//============================================================================= -/** - * @file Single_Reactor.h - * - * $Id$ - * - * @author Carlos O'Ryan (coryan@cs.wustl.edu) - */ -//============================================================================= - - -#ifndef TAO_SINGLE_REACTOR_H -#define TAO_SINGLE_REACTOR_H -#include "ace/pre.h" - -#include "tao/Reactor_Registry.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class TAO_Leader_Follower; - -/** - * @class TAO_Single_Reactor - * - * @brief The Single_Reactor concurrency strategy. - * - * This strategy creates a different reactor for each priority - * level, threads at the right priority level run the event loop - * on that reactor. - * Multiple threads can share the same reactor, usually using the - * thread-pool strategy. - */ -class TAO_Export TAO_Single_Reactor : public TAO_Reactor_Registry -{ -public: - /// Default constructor - TAO_Single_Reactor (void); - - /// The destructor - virtual ~TAO_Single_Reactor (void); - - // = The TAO_Reactor_Registry methods, please check the - // documentation in tao/Reactor_Registry.h - virtual void open (TAO_ORB_Core* orb_core); - virtual ACE_Reactor *reactor (void); - virtual ACE_Reactor *reactor (TAO_Acceptor *acceptor); - virtual TAO_Leader_Follower &leader_follower (void); - virtual TAO_Leader_Follower &leader_follower (TAO_Acceptor *acceptor); - virtual void destroy_tss_cookie (void* cookie); - virtual int shutdown_all (void); - -private: - /// The leader follower - TAO_Leader_Follower *leader_follower_; -}; - -#if defined (__ACE_INLINE__) -# include "tao/Single_Reactor.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_SINGLE_REACTOR_H */ diff --git a/TAO/tao/Single_Reactor.i b/TAO/tao/Single_Reactor.i deleted file mode 100644 index 073a813d569..00000000000 --- a/TAO/tao/Single_Reactor.i +++ /dev/null @@ -1,6 +0,0 @@ -// $Id$ - -ACE_INLINE -TAO_Single_Reactor::TAO_Single_Reactor (void) -{ -} diff --git a/TAO/tao/Strategies/Reactor_Per_Priority.cpp b/TAO/tao/Strategies/Reactor_Per_Priority.cpp deleted file mode 100644 index b0b545a1565..00000000000 --- a/TAO/tao/Strategies/Reactor_Per_Priority.cpp +++ /dev/null @@ -1,218 +0,0 @@ -// $Id$ - -#include "Reactor_Per_Priority.h" -#include "tao/ORB_Core.h" -#include "tao/Resource_Factory.h" -#include "tao/Leader_Follower.h" -#include "tao/Pluggable.h" -#include "tao/debug.h" -#include "ace/Reactor.h" - -#if !defined (__ACE_INLINE__) -# include "Reactor_Per_Priority.i" -#endif /* ! __ACE_INLINE__ */ - -ACE_RCSID(Strategies, Reactor_Per_Priority, "$Id$") - -TAO_Reactor_Per_Priority::~TAO_Reactor_Per_Priority (void) -{ - for (Map_Iterator i = this->map_.begin (); - i != this->map_.end (); - ++i) - { - delete (*i).int_id_; - } -} - -ACE_Reactor * -TAO_Reactor_Per_Priority::reactor (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - - TAO_ORB_Core_TSS_Resources *tss = - this->orb_core ()->get_tss_resources (); - - TAO_Leader_Follower *leader_follower = - ACE_static_cast (TAO_Leader_Follower*, - tss->reactor_registry_cookie_); - - if (leader_follower != 0) - return leader_follower->reactor (); - - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (ACE_TRY_ENV); - ACE_CHECK_RETURN (0); - - CORBA::Short priority = 0; - if (tph->get_thread_CORBA_priority (priority, - ACE_TRY_ENV) - == -1) - { - if (TAO_debug_level > 3) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - Reactor_Per_Priority::reactor: ") - ACE_TEXT (" cannot get priority for this thread\n"))); - return 0; - } - - leader_follower = this->leader_follower_i (priority); - - return leader_follower->reactor (); -} - -ACE_Reactor * -TAO_Reactor_Per_Priority::reactor (TAO_Acceptor *acceptor) -{ - // - // Here is the explanation for going from CORBA priority to Native - // and back again: - // - // Suppose the user specifies 20,000 as the (CORBA) priority for a - // endpoint. 20,000 will be mapped to the native priority (say 10) - // when the thread is created. When the thread goes to access it's - // reactor, the native priority will be converted to the CORBA - // priority (say 19,000) which is used to look up the reactor. - // There is a loss of precision in this conversion. - // - // We use the same two step normalization here. Otherwise, we'll - // get a reactor which is different than the one used by the - // endpoint thread(s). - - CORBA::Short normalized_corba_priority = 0; - CORBA::Short user_specified_corba_priority = - acceptor->priority (); - - TAO_CORBA_Priority_Normalizer *corba_priority_normalizer = - this->orb_core ()->corba_priority_normalizer (); - - CORBA::Boolean result = - corba_priority_normalizer->normalize (user_specified_corba_priority, - normalized_corba_priority); - if (result == 0) - return 0; - - TAO_Leader_Follower *leader_follower = - this->leader_follower_i (normalized_corba_priority); - - return leader_follower->reactor (); -} - -TAO_Leader_Follower & -TAO_Reactor_Per_Priority::leader_follower (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - - TAO_ORB_Core_TSS_Resources *tss = - this->orb_core ()->get_tss_resources (); - - TAO_Leader_Follower *leader_follower = - ACE_static_cast (TAO_Leader_Follower*, - tss->reactor_registry_cookie_); - - if (leader_follower != 0) - return *leader_follower; - - TAO_Protocols_Hooks *tph = - this->orb_core ()->get_protocols_hooks (ACE_TRY_ENV); - ACE_CHECK_RETURN (*leader_follower); - - CORBA::Short priority = 0; - if (tph->get_thread_CORBA_priority (priority, - ACE_TRY_ENV) - == -1) - return *leader_follower; - - return *this->leader_follower_i (priority); -} - -TAO_Leader_Follower & -TAO_Reactor_Per_Priority::leader_follower (TAO_Acceptor *acceptor) -{ - CORBA::Short priority = - acceptor->priority (); - - return *this->leader_follower_i (priority); -} - -void -TAO_Reactor_Per_Priority::destroy_tss_cookie (void*) -{ - // Do nothing, data is destroyed in the map... -} - -TAO_Leader_Follower * -TAO_Reactor_Per_Priority::leader_follower_i (CORBA::Short priority) -{ - // If the priority of the current thread is not right we return. - TAO_Leader_Follower *leader_follower = 0; - if (this->map_.find (priority, leader_follower) == -1) - { - if (TAO_debug_level > 3) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - new priority %d\n"), - priority)); - // The priority is new, create an entry in the table. - ACE_NEW_RETURN (leader_follower, - TAO_Leader_Follower (this->orb_core ()), - leader_follower); - this->map_.bind (priority, leader_follower); - } - - return leader_follower; -} - -int -TAO_Reactor_Per_Priority::shutdown_all (void) -{ - for (Map_Iterator i = this->map_.begin (); - i != this->map_.end (); - ++i) - { - TAO_Leader_Follower &leader_follower = - *((*i).int_id_); - - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, - ace_mon, - leader_follower.lock (), - -1); - - // Wakeup all the threads waiting blocked in the event loop, - // this does not guarantee that they will all go away, but - // reduces the load on the POA.... - ACE_Reactor *reactor = - leader_follower.reactor (); - - reactor->wakeup_all_threads (); - - // If there are some client threads running we have to wait - // until they finish, when the last one does it will shutdown - // the reactor for us. Meanwhile no new requests will be - // accepted because the POA will not process them. - - if (!leader_follower.has_clients ()) - { - // Wake up all waiting threads in the reactor. - reactor->end_reactor_event_loop (); - } - } - - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - -template class ACE_Map_Manager<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX>; -template class ACE_Map_Iterator<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX>; -template class ACE_Map_Iterator_Base<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX>; -template class ACE_Map_Reverse_Iterator<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX>; -template class ACE_Map_Entry<CORBA::Short,TAO_Leader_Follower*>; - -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) - -#pragma instantiate ACE_Map_Manager<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX> -#pragma instantiate ACE_Map_Iterator<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX> -#pragma instantiate ACE_Map_Entry<CORBA::Short,TAO_Leader_Follower*> - -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Strategies/Reactor_Per_Priority.h b/TAO/tao/Strategies/Reactor_Per_Priority.h deleted file mode 100644 index 50a4e209b1b..00000000000 --- a/TAO/tao/Strategies/Reactor_Per_Priority.h +++ /dev/null @@ -1,78 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// Reactor_Per_Priority.h -// -// = AUTHOR -// Carlos O'Ryan (coryan@cs.wustl.edu) -// -// ============================================================================ - -#ifndef TAO_REACTOR_PER_PRIORITY_H -#define TAO_REACTOR_PER_PRIORITY_H -#include "ace/pre.h" - -#include "tao/Reactor_Registry.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "strategies_export.h" -#include "ace/Map_Manager.h" - -class TAO_Leader_Follower; - -class TAO_Strategies_Export TAO_Reactor_Per_Priority : public TAO_Reactor_Registry -{ - // = TITLE - // The Reactor_Per_Priority concurrency strategy. - // - // = DESCRIPTION - // This strategy creates a different reactor for each priority - // level, threads at the right priority level run the event loop - // on that reactor. - // Multiple threads can share the same reactor, usually using the - // thread-pool strategy. - // -public: - TAO_Reactor_Per_Priority (void); - // Default constructor - - virtual ~TAO_Reactor_Per_Priority (void); - // The destructor - - // = The TAO_Reactor_Registry methods, please check the - // documentation in tao/Reactor_Registry.h - virtual ACE_Reactor *reactor (void); - virtual ACE_Reactor *reactor (TAO_Acceptor *acceptor); - virtual TAO_Leader_Follower &leader_follower (void); - virtual TAO_Leader_Follower &leader_follower (TAO_Acceptor *acceptor); - virtual void destroy_tss_cookie (void* cookie); - virtual int shutdown_all (void); - -private: - TAO_Leader_Follower *leader_follower_i (CORBA::Short priority); - // Obtain the leader follower object given a priority, used to - // implement all the other methods - -private: - typedef ACE_Map_Manager<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX> Map; - typedef ACE_Map_Iterator<CORBA::Short,TAO_Leader_Follower*,TAO_SYNCH_MUTEX> Map_Iterator; - - Map map_; - // The map between priorities and the control structure for the - // reactor -}; - -#if defined (__ACE_INLINE__) -# include "Reactor_Per_Priority.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* TAO_REACTOR_PER_PRIORITY_H */ diff --git a/TAO/tao/Strategies/Reactor_Per_Priority.i b/TAO/tao/Strategies/Reactor_Per_Priority.i deleted file mode 100644 index 86c085d631a..00000000000 --- a/TAO/tao/Strategies/Reactor_Per_Priority.i +++ /dev/null @@ -1,6 +0,0 @@ -// $Id$ - -ACE_INLINE -TAO_Reactor_Per_Priority::TAO_Reactor_Per_Priority (void) -{ -} diff --git a/TAO/tests/Collocation/Coll_Test_Stubs.bor b/TAO/tests/Collocation/Coll_Test_Stubs.bor deleted file mode 100644 index 7ec9937298d..00000000000 --- a/TAO/tests/Collocation/Coll_Test_Stubs.bor +++ /dev/null @@ -1,38 +0,0 @@ -# -# Makefile for building the Coll_Test_Stubs library -# - -NAME = Coll_Test_Stubs - -TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe -Ge 1 -Gd \ - -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export \ - -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h - -OBJFILES = \ - $(OBJDIR)\DiamondC.obj - -CFLAGS = \ - $(ACE_CFLAGS) \ - $(TAO_CFLAGS) \ - -DMY_STUB_HAS_DLL=1 \ - -DMY_STUB_BUILD_DLL=1 - -LIBFILES = \ - $(ACE_LIB) \ - $(TAO_LIB) - -IDLFILES = \ - $(IDLDIR)\Diamond.idl - -CPPDIR = . - -IDLDIR = . - -!include <$(ACE_ROOT)\include\makeinclude\build_dll.bor> - -# -# IDL Build rules -# - -$(IDLDIR)\DiamondS.cpp $(IDLDIR)\DiamondC.cpp: $(IDLDIR)\Diamond.idl - $(TAO_IDL) $** diff --git a/TAO/tests/Collocation/Coll_Test_Stubs.dsp b/TAO/tests/Collocation/Coll_Test_Stubs.dsp deleted file mode 100644 index ab22359b7fd..00000000000 --- a/TAO/tests/Collocation/Coll_Test_Stubs.dsp +++ /dev/null @@ -1,206 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Coll_Test_Stubs DLL" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=Coll_Test_Stubs DLL - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Coll_Test_Stubs.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Coll_Test_Stubs.mak" CFG="Coll_Test_Stubs DLL - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Coll_Test_Stubs DLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "Coll_Test_Stubs DLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Coll_Test_Stubs DLL - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COLL_TEST_STUBS_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /I "..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "MY_STUB_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 ace.lib tao.lib /nologo /dll /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ELSEIF "$(CFG)" == "Coll_Test_Stubs DLL - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Coll_Test_Stubs___Win32_Debug"
-# PROP BASE Intermediate_Dir "Coll_Test_Stubs___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COLL_TEST_STUBS_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\\" /I "..\..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "MY_STUB_BUILD_DLL" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib taod.lib /nologo /dll /debug /machine:I386 /out:"Coll_Test_Stubsd.dll" /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Coll_Test_Stubs DLL - Win32 Release"
-# Name "Coll_Test_Stubs DLL - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\DiamondC.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\DiamondC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\stub_export.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\Diamond.idl
-
-!IF "$(CFG)" == "Coll_Test_Stubs DLL - Win32 Release"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__DIAMO="..\..\..\bin\release\tao_idl.exe"
-# Begin Custom Build - Invoking tao_idl on $(InputName).idl
-InputPath=.\Diamond.idl
-InputName=Diamond
-
-BuildCmds= \
- ..\..\..\bin\release\tao_idl.exe -Ge 1 -Gd -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "Coll_Test_Stubs DLL - Win32 Debug"
-
-# PROP Ignore_Default_Tool 1
-USERDEP__DIAMO="..\..\..\bin\tao_idl.exe"
-# Begin Custom Build - Invoking tao_idl on $(InputName).idl
-InputPath=.\Diamond.idl
-InputName=Diamond
-
-BuildCmds= \
- ..\..\..\bin\tao_idl.exe -Ge 1 -Gd -Wb,skel_export_macro=Diamond_Export -Wb,stub_export_macro=MY_Stub_Export -Wb,skel_export_include=diamond_export.h -Wb,stub_export_include=stub_export.h $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/tests/Collocation/Coll_Tester.cpp b/TAO/tests/Collocation/Coll_Tester.cpp deleted file mode 100644 index 26c220166de..00000000000 --- a/TAO/tests/Collocation/Coll_Tester.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id$ - -//============================================================================ -// -// =FILENAME -// Collocation_Test.h -// -// =DESCRIPTION -// Server class to perform testing of TAO's collocation mechanism. -// -// =AUTHOR -// Nanbor Wang -// -//============================================================================= - -#include "Coll_Tester.h" - -Collocation_Test::Collocation_Test (void) -{ - // no-op. -} - -void -Collocation_Test::shutdown (CORBA::Environment &ACE_TRY_ENV) -{ - this->root_poa_->destroy (1, 1, ACE_TRY_ENV); - ACE_CHECK; - this->orb_->destroy (ACE_TRY_ENV); - ACE_CHECK; -} - -int -Collocation_Test::init (int argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) -{ - // Initialize the ORB. - this->orb_ = CORBA::ORB_init (argc, argv, 0, ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - int result = this->parse_args (argc, argv); - if (result != 0) - return result; - - // Get an Object reference to RootPOA. - CORBA::Object_var obj = - this->orb_->resolve_initial_references ("RootPOA", ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Narrow the Object reference to a POA reference - this->root_poa_ = - PortableServer::POA::_narrow (obj.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Get the POAManager of RootPOA - this->poa_manager_ = - this->root_poa_->the_POAManager (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // Activate the diamond servant and its base classes under RootPOA. - PortableServer::ObjectId_var id = - this->root_poa_->activate_object (&this->top_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - -// // We only care about the most derived class here. -// this->diamond_obj_ = this->diamond_servant_._this (ACE_TRY_ENV); -// ACE_CHECK_RETURN (-1); - - id = - this->root_poa_->activate_object (&this->diamond_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - // We only care about the most derived class here. - this->diamond_obj_ = this->root_poa_->id_to_reference (id.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - id = - this->root_poa_->activate_object (&this->left_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - id = - this->root_poa_->activate_object (&this->right_servant_, - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - CORBA::String_var str = - this->orb_->object_to_string (this->diamond_obj_.in (), - ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n", - str.in())); - - return 0; - - -} - -int -Collocation_Test::parse_args (int /*argc*/, - char *[] /*argv*/) -{ - return 0; -} - -int -Collocation_Test::test_narrow (CORBA::Environment &ACE_TRY_ENV) -{ - Diamond::Top_var top = - Diamond::Top::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - Diamond::Left_var left = - Diamond::Left::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - Diamond::Right_var right = - Diamond::Right::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - Diamond::Buttom_var buttom = - Diamond::Buttom::_narrow (this->diamond_obj_.in (), ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - CORBA::String_var str = top->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ())); - - str = left->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ())); - - str = right->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ())); - - str = buttom->shape (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ())); - - return 0; -} - -int -Collocation_Test::run (CORBA::Environment &ACE_TRY_ENV) -{ - this->poa_manager_->activate (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - this->test_narrow (ACE_TRY_ENV); - ACE_CHECK_RETURN (-1); - - return 0; -} diff --git a/TAO/tests/Collocation/Coll_Tester.h b/TAO/tests/Collocation/Coll_Tester.h deleted file mode 100644 index 584710a098a..00000000000 --- a/TAO/tests/Collocation/Coll_Tester.h +++ /dev/null @@ -1,64 +0,0 @@ -// $Id$ - -//============================================================================ -// -// = FILENAME -// Collocation_Test.h -// -// = DESCRIPTION -// Server class to perform testing of TAO's collocation mechanism. -// -// = AUTHOR -// Nanbor Wang -// -//============================================================================= - -#if !defined (TAO_COLLOCATION_TEST_H) -#define TAO_COLLOCATION_TEST_H - -#include "Diamond_i.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - - -class Collocation_Test -{ -public: - Collocation_Test (void); - - void shutdown (CORBA::Environment &ACE_TRY_ENV); - - int init (int argc, char *argv[], CORBA::Environment &); - // Initializing the Collocation_Test object. - - int parse_args (int argc, char *argv[]); - // Parse the test specific arguments. - - int test_narrow (CORBA::Environment &); - // This test narrow an object reference to its base class and see - // if it works correctly. - - int run (CORBA::Environment &); - // Run the test. - -private: - CORBA::ORB_var orb_; - - PortableServer::POA_var root_poa_; - - PortableServer::POAManager_var poa_manager_; - - CORBA::Object_var diamond_obj_; - // Our basic test object. - - Top_i top_servant_; - Left_i left_servant_; - Right_i right_servant_; - Buttom_i diamond_servant_; - // A collection of servant for basic narrowing test. -}; - -#endif /* TAO_COLLOCATION_TEST_H */ diff --git a/TAO/tests/RTCORBA/Banded_Connections/server.conf b/TAO/tests/RTCORBA/Banded_Connections/server.conf deleted file mode 100644 index 8100e1d8dd3..00000000000 --- a/TAO/tests/RTCORBA/Banded_Connections/server.conf +++ /dev/null @@ -1,4 +0,0 @@ -# $Id$ -# -static Advanced_Resource_Factory "-ORBReactorType tp -ORBReactorRegistry per-priority" - diff --git a/TAO/tests/RTCORBA/Server_Declared/server.conf b/TAO/tests/RTCORBA/Server_Declared/server.conf deleted file mode 100644 index 1a3860c473e..00000000000 --- a/TAO/tests/RTCORBA/Server_Declared/server.conf +++ /dev/null @@ -1,3 +0,0 @@ -# $Id$ -# -static Advanced_Resource_Factory "-ORBReactorType tp -ORBReactorRegistry per-priority" diff --git a/protocols/ace/RMCast/README b/protocols/ace/RMCast/README deleted file mode 100644 index 2dd0c5d9cfc..00000000000 --- a/protocols/ace/RMCast/README +++ /dev/null @@ -1,57 +0,0 @@ -# $Id$ - - This directory will contain a simple, small-scale reliable -multicast framework for ACE. The framework is based on the ASX -components of the ACE library: the protocol is implemented as a stack -of interchangeable "modules", each one in charge of a very small task. -For example, one module implements fragmentation and reassembly, other -modules implement retransmission, send ACK and NAK messages, and -maintain receiver membership. - - The modules are replaced to achieve different levels of -reliability. For example, the retransmission module can be either the -"Best_Effort", "Semi_Reliable" or "Reliable" implementation. In the -first case no retransmissions are performed, but lost messages are -detected and reported to the receiver. The "Semi_Reliable" case -messages are held for a pre-specified amount of time, and -re-transmited if requested, but it is possible to loose some messages -if multiple re-transmissions fail. As in the "Best_Effort" case the -lost messages are detected and flagged to the application. Finally -in the "Reliable" mode the senders are flowed controlled until enough -messages are successfully transmitted. - - In general the stack looks like this: - - -SENDER: - ----------------------------------------------------------------- -Buffering : Save lost messages -Retransmission : Retransmit ----------------------------------------------------------------- -Fragmentation : Fragment messages in smaller chunks -Reassembly : and ensure that the IOVMAX limit is not - : reached ----------------------------------------------------------------- -Tranport : Encapsulate the specific transport media - : such as TCP/IP, ATM, or shared memory - : Demuxes incoming data to the right chain - : Change control messages and data messages - : to the right dynamic types. ----------------------------------------------------------------- - -RECEIVER: - ----------------------------------------------------------------- -Lost detection : Detect lost messages and send control - : messages back ----------------------------------------------------------------- -Reassembly : Reassemble messages, fragment control -Fragmentation : data ----------------------------------------------------------------- -Transport : Group membership, ACT reception, - : handle keep-alive messages... ----------------------------------------------------------------- - - -@@ TODO: Piggybacking... diff --git a/protocols/ace/RMCast/RMCast_Export.h b/protocols/ace/RMCast/RMCast_Export.h deleted file mode 100644 index 51257c4d682..00000000000 --- a/protocols/ace/RMCast/RMCast_Export.h +++ /dev/null @@ -1,44 +0,0 @@ -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by -// generate_export_file.pl -// ------------------------------ -#if !defined (ACE_RMCAST_EXPORT_H) -#define ACE_RMCAST_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_RMCAST_HAS_DLL) -# define ACE_RMCAST_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && ACE_RMCAST_HAS_DLL */ - -#if !defined (ACE_RMCAST_HAS_DLL) -#define ACE_RMCAST_HAS_DLL 1 -#endif /* ! ACE_RMCAST_HAS_DLL */ - -#if defined (ACE_RMCAST_HAS_DLL) -# if (ACE_RMCAST_HAS_DLL == 1) -# if defined (ACE_RMCAST_BUILD_DLL) -# define ACE_RMCast_Export ACE_Proper_Export_Flag -# define ACE_RMCAST_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else -# define ACE_RMCast_Export ACE_Proper_Import_Flag -# define ACE_RMCAST_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_RMCAST_BUILD_DLL */ -# else -# define ACE_RMCast_Export -# define ACE_RMCAST_SINGLETON_DECLARATION(T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ! ACE_RMCAST_HAS_DLL == 1 */ -#else -# define ACE_RMCast_Export -# define ACE_RMCAST_SINGLETON_DECLARATION(T) -# define ACE_RMCAST_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_RMCAST_HAS_DLL */ - -#endif /* ACE_RMCAST_EXPORT_H */ - -// End of auto generated file. |