diff options
Diffstat (limited to 'TAO/orbsvcs/tests/EC_Throughput')
10 files changed, 59 insertions, 147 deletions
diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp index ade2d62e17a..26561f30381 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp @@ -38,7 +38,6 @@ Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, { RtecScheduler::handle_t rt_info = scheduler->create (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // The worst case execution time is far less than 2 // milliseconds, but that is a safe estimate.... @@ -54,7 +53,6 @@ Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, 0, RtecScheduler::OPERATION ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ACE_ConsumerQOS_Factory qos; qos.start_disjunction_group (); @@ -66,43 +64,35 @@ Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, // = Connect as a consumer. RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - ec->for_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec->for_consumers (); this->supplier_proxy_ = - consumer_admin->obtain_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + consumer_admin->obtain_push_supplier (); - RtecEventComm::PushConsumer_var objref = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + RtecEventComm::PushConsumer_var objref = this->_this (); this->supplier_proxy_->connect_push_consumer (objref.in (), qos.get_ConsumerQOS () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -Test_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL) +Test_Consumer::disconnect (void) { if (CORBA::is_nil (this->supplier_proxy_.in ())) return; - this->supplier_proxy_->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->supplier_proxy_->disconnect_push_supplier (); this->supplier_proxy_ = RtecEventChannelAdmin::ProxyPushSupplier::_nil (); // Deactivate the servant PortableServer::POA_var poa = - this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->_default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void @@ -160,7 +150,6 @@ Test_Consumer::push (const RtecEventComm::EventSet& events // We stop the timer as soon as we realize it is time to // do so. this->driver_->shutdown_consumer (this->cookie_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } else @@ -177,7 +166,7 @@ Test_Consumer::push (const RtecEventComm::EventSet& events } void -Test_Consumer::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Test_Consumer::disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)) { } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h index 6a086b38087..fc6db8aa9a0 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h @@ -49,7 +49,7 @@ public: ACE_ENV_ARG_DECL); // This method connects the consumer to the EC. - void disconnect (ACE_ENV_SINGLE_ARG_DECL); + void disconnect (void); // Disconnect from the EC. void dump_results (const char* name, @@ -62,7 +62,7 @@ public: virtual void push (const RtecEventComm::EventSet& events ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + virtual void disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)); // The skeleton methods. diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp index 609bf639245..82f52e91aa2 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp @@ -16,8 +16,8 @@ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_unistd.h" -ACE_RCSID (EC_Throughput, - ECT_Consumer_Driver, +ACE_RCSID (EC_Throughput, + ECT_Consumer_Driver, "$Id$") int @@ -52,12 +52,10 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) { this->orb_ = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var poa_object = this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -66,11 +64,9 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); if (this->parse_args (argc, argv)) return 1; @@ -130,7 +126,6 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) CORBA::Object_var naming_obj = this->orb_->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -139,7 +134,6 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CosNaming::Name schedule_name (1); schedule_name.length (1); @@ -147,13 +141,11 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) CORBA::Object_var sched_obj = naming_context->resolve (schedule_name ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (sched_obj.in ())) return 1; RtecScheduler::Scheduler_var scheduler = RtecScheduler::Scheduler::_narrow (sched_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CosNaming::Name name (1); name.length (1); @@ -161,7 +153,6 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) CORBA::Object_var ec_obj = naming_context->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; RtecEventChannelAdmin::EventChannel_var channel; if (CORBA::is_nil (ec_obj.in ())) @@ -169,13 +160,10 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) else channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); this->connect_consumers (scheduler.in (), channel.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); @@ -184,7 +172,6 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) { ACE_Time_Value tv (1, 0); this->orb_->perform_work (tv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 1); if (this->active_count_ <= 0) break; @@ -193,20 +180,16 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) this->dump_results (); - this->disconnect_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->disconnect_consumers (); if (this->shutdown_event_channel_ != 0) { - channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + channel->destroy (); } root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - this->orb_->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->orb_->destroy (); } ACE_CATCH (CORBA::SystemException, sys_ex) { @@ -260,7 +243,6 @@ ECT_Consumer_Driver::connect_consumers this->type_count_, channel ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } @@ -282,12 +264,11 @@ ECT_Consumer_Driver::dump_results (void) } void -ECT_Consumer_Driver::disconnect_consumers (ACE_ENV_SINGLE_ARG_DECL) +ECT_Consumer_Driver::disconnect_consumers (void) { for (int i = 0; i < this->n_consumers_; ++i) { - this->consumers_[i]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->consumers_[i]->disconnect (); delete this->consumers_[i]; this->consumers_[i] = 0; diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h index 4af70e0f7a8..35c31f8591e 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h @@ -57,7 +57,7 @@ private: void connect_consumers (RtecScheduler::Scheduler_ptr scheduler, RtecEventChannelAdmin::EventChannel_ptr local_ec ACE_ENV_ARG_DECL); - void disconnect_consumers (ACE_ENV_SINGLE_ARG_DECL); + void disconnect_consumers (void); // Connect and disconnect the consumers. void dump_results (void); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp index 0d75c42b29b..b5b04c3e371 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp @@ -53,7 +53,6 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, RtecScheduler::handle_t rt_info = scheduler->create (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ACE_Time_Value tv (0, burst_pause); RtecScheduler::Period_t rate = tv.usec () * 10; @@ -74,7 +73,6 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, 1, RtecScheduler::OPERATION ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->supplier_id_ = ACE::crc32 (name); ACE_DEBUG ((LM_DEBUG, "ID for <%s> is %04.4x\n", name, @@ -92,44 +90,36 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, rt_info, 1); RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - ec->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + ec->for_suppliers (); this->consumer_proxy_ = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + supplier_admin->obtain_push_consumer (); RtecEventComm::PushSupplier_var objref = - this->supplier_._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->supplier_._this (); this->consumer_proxy_->connect_push_supplier (objref.in (), qos.get_SupplierQOS () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -Test_Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL) +Test_Supplier::disconnect (void) { if (CORBA::is_nil (this->consumer_proxy_.in ())) return; - this->consumer_proxy_->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->consumer_proxy_->disconnect_push_consumer (); this->consumer_proxy_ = RtecEventChannelAdmin::ProxyPushConsumer::_nil (); // Deactivate the servant PortableServer::POA_var poa = - this->supplier_._default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->supplier_._default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (&this->supplier_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } int @@ -186,7 +176,6 @@ Test_Supplier::svc () // ACE_DEBUG ((LM_DEBUG, "(%t) supplier push event\n")); this->consumer_proxy ()->push (event ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_hrtime_t end = ACE_OS::gethrtime (); this->throughput_.sample (end - test_start, end - request_start); @@ -209,7 +198,6 @@ Test_Supplier::svc () ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, request_start); this->consumer_proxy ()->push(event ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_hrtime_t end = ACE_OS::gethrtime (); this->throughput_.sample (end - test_start, end - request_start); @@ -231,7 +219,7 @@ Test_Supplier::svc () } void -Test_Supplier::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +Test_Supplier::disconnect_push_supplier (void) { } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h index 17fbcb8ce02..ec0f8e02ccd 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h @@ -49,10 +49,10 @@ public: ACE_ENV_ARG_DECL); // This method connects the supplier to the EC. - void disconnect (ACE_ENV_SINGLE_ARG_DECL); + void disconnect (void); // Disconnect from the EC. - virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_NOT_USED); + virtual void disconnect_push_supplier (void); // The methods in the skeleton. RtecEventComm::EventSourceID supplier_id (void) const; diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp index d2350ca9a04..4cf395bd7c6 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp @@ -16,8 +16,8 @@ #include "ace/OS_NS_errno.h" #include "ace/OS_NS_unistd.h" -ACE_RCSID (EC_Throughput, - ECT_Supplier_Driver, +ACE_RCSID (EC_Throughput, + ECT_Supplier_Driver, "$Id$") int @@ -59,11 +59,9 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -72,11 +70,9 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); if (this->parse_args (argc, argv)) return 1; @@ -141,7 +137,6 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) CORBA::Object_var naming_obj = orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -150,7 +145,6 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CosNaming::Name schedule_name (1); schedule_name.length (1); @@ -158,20 +152,17 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) CORBA::Object_var sched_obj = naming_context->resolve (schedule_name ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (sched_obj.in ())) return 1; RtecScheduler::Scheduler_var scheduler = RtecScheduler::Scheduler::_narrow (sched_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CosNaming::Name name (1); name.length (1); name[0].id = CORBA::string_dup ("EventService"); CORBA::Object_var ec_obj = naming_context->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; RtecEventChannelAdmin::EventChannel_var channel; if (CORBA::is_nil (ec_obj.in ())) @@ -179,20 +170,16 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) else channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); this->connect_suppliers (scheduler.in (), channel.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); - this->activate_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->activate_suppliers (); ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); @@ -207,18 +194,15 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) this->dump_results (); - this->disconnect_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->disconnect_suppliers (); ACE_DEBUG ((LM_DEBUG, "suppliers disconnected\n")); // @@ Deactivate the suppliers (as CORBA Objects?) root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + orb->destroy (); ACE_DEBUG ((LM_DEBUG, "orb and poa destroyed\n")); } @@ -257,12 +241,11 @@ ECT_Supplier_Driver::connect_suppliers this->type_count_, channel ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } void -ECT_Supplier_Driver::activate_suppliers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ECT_Supplier_Driver::activate_suppliers (void) { for (int i = 0; i < this->n_suppliers_; ++i) { @@ -271,12 +254,11 @@ ECT_Supplier_Driver::activate_suppliers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } void -ECT_Supplier_Driver::disconnect_suppliers (ACE_ENV_SINGLE_ARG_DECL) +ECT_Supplier_Driver::disconnect_suppliers (void) { for (int i = 0; i < this->n_suppliers_; ++i) { - this->suppliers_[i]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->suppliers_[i]->disconnect (); delete this->suppliers_[i]; this->suppliers_[i] = 0; diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h index e51f0f73551..71f06bf4de8 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h @@ -53,10 +53,10 @@ private: void connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, RtecEventChannelAdmin::EventChannel_ptr local_ec ACE_ENV_ARG_DECL); - void disconnect_suppliers (ACE_ENV_SINGLE_ARG_DECL); + void disconnect_suppliers (void); // Connect the suppliers. - void activate_suppliers (ACE_ENV_SINGLE_ARG_DECL); + void activate_suppliers (void); // Activate the suppliers, i.e. they start generating events. void dump_results (void); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp index 8aeb5fbbc40..5a3c157b5d8 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp @@ -71,12 +71,10 @@ ECT_Throughput::run (int argc, char* argv[]) this->orb_ = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; CORBA::Object_var poa_object = this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -85,14 +83,11 @@ ECT_Throughput::run (int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + root_poa->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + poa_manager->activate (); if (this->parse_args (argc, argv)) return 1; @@ -185,14 +180,12 @@ ECT_Throughput::run (int argc, char* argv[]) runtime_infos); #endif RtecScheduler::Scheduler_var scheduler = - scheduler_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + scheduler_impl._this (); #if 0 CORBA::Object_var naming_obj = this->orb_->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -201,7 +194,6 @@ ECT_Throughput::run (int argc, char* argv[]) CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // This is the name we (potentially) register the Scheduling // Service in the Naming Service. @@ -211,13 +203,11 @@ ECT_Throughput::run (int argc, char* argv[]) CORBA::String_var str = this->orb_->object_to_string (scheduler.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "The (local) scheduler IOR is <%s>\n", str.in ())); // Register the servant with the Naming Context.... naming_context->rebind (schedule_name, scheduler.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_Scheduler_Factory::use_config (naming_context.in ()); #endif /* 0 */ @@ -230,31 +220,26 @@ ECT_Throughput::run (int argc, char* argv[]) TAO_EC_Event_Channel *ec = new TAO_EC_Event_Channel (attr); - ec->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec->activate (); auto_ptr<POA_RtecEventChannelAdmin::EventChannel> auto_ec_impl (ec); ec_impl = auto_ec_impl; RtecEventChannelAdmin::EventChannel_var channel = - ec_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl->_this (); this->connect_consumers (scheduler.in (), channel.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); this->connect_suppliers (scheduler.in (), channel.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); - this->activate_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->activate_suppliers (); ACE_DEBUG ((LM_DEBUG, "suppliers are active\n")); @@ -269,31 +254,25 @@ ECT_Throughput::run (int argc, char* argv[]) this->dump_results (); - this->disconnect_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->disconnect_consumers (); ACE_DEBUG ((LM_DEBUG, "consumers disconnected\n")); - this->disconnect_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + this->disconnect_suppliers (); ACE_DEBUG ((LM_DEBUG, "suppliers disconnected\n")); - channel->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + channel->destroy (); ACE_DEBUG ((LM_DEBUG, "channel destroyed\n")); { // Deactivate the EC PortableServer::POA_var poa = - ec_impl->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec_impl->_default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (ec_impl.get () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "EC deactivated\n")); } @@ -301,13 +280,10 @@ ECT_Throughput::run (int argc, char* argv[]) { // Deactivate the Scheduler PortableServer::POA_var poa = - scheduler_impl._default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + scheduler_impl._default_POA (); PortableServer::ObjectId_var id = poa->servant_to_id (&scheduler_impl ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "scheduler deactivated\n")); } @@ -375,7 +351,6 @@ ECT_Throughput::connect_consumers this->consumer_type_count_, channel ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } @@ -403,12 +378,11 @@ ECT_Throughput::connect_suppliers this->supplier_type_count_, channel ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } void -ECT_Throughput::activate_suppliers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ECT_Throughput::activate_suppliers (void) { int priority = (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) @@ -427,22 +401,20 @@ ECT_Throughput::activate_suppliers (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) } void -ECT_Throughput::disconnect_suppliers (ACE_ENV_SINGLE_ARG_DECL) +ECT_Throughput::disconnect_suppliers (void) { for (int i = 0; i < this->n_suppliers_; ++i) { - this->suppliers_[i]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->suppliers_[i]->disconnect (); } } void -ECT_Throughput::disconnect_consumers (ACE_ENV_SINGLE_ARG_DECL) +ECT_Throughput::disconnect_consumers (void) { for (int i = 0; i < this->n_consumers_; ++i) { - this->consumers_[i]->disconnect (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->consumers_[i]->disconnect (); } } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h index cb1ceae4a8b..9cfadae7a92 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h @@ -56,16 +56,16 @@ private: void connect_consumers (RtecScheduler::Scheduler_ptr scheduler, RtecEventChannelAdmin::EventChannel_ptr local_ec ACE_ENV_ARG_DECL); - void disconnect_consumers (ACE_ENV_SINGLE_ARG_DECL); + void disconnect_consumers (void); // Connect and disconnect the consumers. void connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, RtecEventChannelAdmin::EventChannel_ptr local_ec ACE_ENV_ARG_DECL); - void disconnect_suppliers (ACE_ENV_SINGLE_ARG_DECL); + void disconnect_suppliers (void); // Connect the suppliers. - void activate_suppliers (ACE_ENV_SINGLE_ARG_DECL); + void activate_suppliers (void); // Activate the suppliers, i.e. they start generating events. void dump_results (void); |