From c979767a00db4ea1299af482033a68829cc16675 Mon Sep 17 00:00:00 2001 From: elliott_c Date: Thu, 25 Jan 2007 18:04:11 +0000 Subject: ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott --- TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp | 20 ++++---- TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h | 6 +-- .../tests/EC_Throughput/ECT_Consumer_Driver.cpp | 49 ++++++++----------- .../tests/EC_Throughput/ECT_Consumer_Driver.h | 6 +-- TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h | 3 +- TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp | 31 +++++------- TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h | 3 +- .../tests/EC_Throughput/ECT_Supplier_Driver.cpp | 46 ++++++++---------- .../tests/EC_Throughput/ECT_Supplier_Driver.h | 6 +-- TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp | 56 +++++++++------------- TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h | 9 ++-- 11 files changed, 94 insertions(+), 141 deletions(-) (limited to 'TAO/orbsvcs/tests/EC_Throughput') diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp index 26561f30381..8ce4695e239 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp @@ -33,11 +33,10 @@ Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, const char* name, int type_start, int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) + RtecEventChannelAdmin::EventChannel_ptr ec) { RtecScheduler::handle_t rt_info = - scheduler->create (name ACE_ENV_ARG_PARAMETER); + scheduler->create (name); // The worst case execution time is far less than 2 // milliseconds, but that is a safe estimate.... @@ -51,8 +50,7 @@ Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, RtecScheduler::VERY_LOW_IMPORTANCE, time, 0, - RtecScheduler::OPERATION - ACE_ENV_ARG_PARAMETER); + RtecScheduler::OPERATION); ACE_ConsumerQOS_Factory qos; qos.start_disjunction_group (); @@ -72,8 +70,7 @@ Test_Consumer::connect (RtecScheduler::Scheduler_ptr scheduler, RtecEventComm::PushConsumer_var objref = this->_this (); this->supplier_proxy_->connect_push_consumer (objref.in (), - qos.get_ConsumerQOS () - ACE_ENV_ARG_PARAMETER); + qos.get_ConsumerQOS ()); } void @@ -91,8 +88,8 @@ Test_Consumer::disconnect (void) PortableServer::POA_var poa = this->_default_POA (); PortableServer::ObjectId_var id = - poa->servant_to_id (this ACE_ENV_ARG_PARAMETER); - poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); + poa->servant_to_id (this); + poa->deactivate_object (id.in ()); } void @@ -109,8 +106,7 @@ Test_Consumer::accumulate (ACE_Throughput_Stats& stats) const } void -Test_Consumer::push (const RtecEventComm::EventSet& events - ACE_ENV_ARG_DECL) +Test_Consumer::push (const RtecEventComm::EventSet& events) ACE_THROW_SPEC ((CORBA::SystemException)) { if (events.length () == 0) @@ -149,7 +145,7 @@ 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); + this->driver_->shutdown_consumer (this->cookie_); } } else diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h index fc6db8aa9a0..5621cc3d99a 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h @@ -45,8 +45,7 @@ public: const char* name, int type_start, int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); + RtecEventChannelAdmin::EventChannel_ptr ec); // This method connects the consumer to the EC. void disconnect (void); @@ -59,8 +58,7 @@ public: void accumulate (ACE_Throughput_Stats& stats) const; // Add our throughput and latency statistics to - virtual void push (const RtecEventComm::EventSet& events - ACE_ENV_ARG_DECL) + virtual void push (const RtecEventComm::EventSet& events) ACE_THROW_SPEC ((CORBA::SystemException)); virtual void disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp index 82f52e91aa2..5ca4305b28f 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.cpp @@ -47,15 +47,13 @@ ECT_Consumer_Driver::~ECT_Consumer_Driver (void) int ECT_Consumer_Driver::run (int argc, char* argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { this->orb_ = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA" - ACE_ENV_ARG_PARAMETER); + this->orb_->resolve_initial_references("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -63,7 +61,7 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); @@ -124,8 +122,7 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) } CORBA::Object_var naming_obj = - this->orb_->resolve_initial_references ("NameService" - ACE_ENV_ARG_PARAMETER); + this->orb_->resolve_initial_references ("NameService"); if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -133,37 +130,35 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); + CosNaming::NamingContext::_narrow (naming_obj.in ()); CosNaming::Name schedule_name (1); schedule_name.length (1); schedule_name[0].id = CORBA::string_dup ("ScheduleService"); CORBA::Object_var sched_obj = - naming_context->resolve (schedule_name ACE_ENV_ARG_PARAMETER); + naming_context->resolve (schedule_name); if (CORBA::is_nil (sched_obj.in ())) return 1; RtecScheduler::Scheduler_var scheduler = - RtecScheduler::Scheduler::_narrow (sched_obj.in () - ACE_ENV_ARG_PARAMETER); + RtecScheduler::Scheduler::_narrow (sched_obj.in ()); 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); + naming_context->resolve (name); RtecEventChannelAdmin::EventChannel_var channel; if (CORBA::is_nil (ec_obj.in ())) channel = RtecEventChannelAdmin::EventChannel::_nil (); else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in () - ACE_ENV_ARG_PARAMETER); + channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in ()); poa_manager->activate (); - this->connect_consumers (scheduler.in (), channel.in () ACE_ENV_ARG_PARAMETER); + this->connect_consumers (scheduler.in (), channel.in ()); ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); @@ -171,7 +166,7 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) for (;;) { ACE_Time_Value tv (1, 0); - this->orb_->perform_work (tv ACE_ENV_ARG_PARAMETER); + this->orb_->perform_work (tv); ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 1); if (this->active_count_ <= 0) break; @@ -187,25 +182,23 @@ ECT_Consumer_Driver::run (int argc, char* argv[]) channel->destroy (); } - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); + root_poa->destroy (1, 1); this->orb_->destroy (); } - ACE_CATCH (CORBA::SystemException, sys_ex) + catch (const CORBA::SystemException& sys_ex) { - ACE_PRINT_EXCEPTION (sys_ex, "SYS_EX"); + sys_ex._tao_print_exception ("SYS_EX"); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "NON SYS EX"); + ex._tao_print_exception ("NON SYS EX"); } - ACE_ENDTRY; return 0; } void -ECT_Consumer_Driver::shutdown_consumer (void* - ACE_ENV_ARG_DECL_NOT_USED) +ECT_Consumer_Driver::shutdown_consumer (void*) { // int ID = // (reinterpret_cast (consumer_cookie) @@ -220,8 +213,7 @@ ECT_Consumer_Driver::shutdown_consumer (void* void ECT_Consumer_Driver::connect_consumers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel - ACE_ENV_ARG_DECL) + RtecEventChannelAdmin::EventChannel_ptr channel) { { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); @@ -241,8 +233,7 @@ ECT_Consumer_Driver::connect_consumers buf, this->type_start_, this->type_count_, - channel - ACE_ENV_ARG_PARAMETER); + channel); } } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h index 35c31f8591e..198c4160cc5 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer_Driver.h @@ -44,8 +44,7 @@ public: int run (int argc, char* argv[]); // Execute the test. - virtual void shutdown_consumer (void* consumer_cookie - ACE_ENV_ARG_DECL_NOT_USED); + virtual void shutdown_consumer (void* consumer_cookie); // Callback method for consumers, each consumer will call this // method once it receives all the shutdown events from the // suppliers. @@ -55,8 +54,7 @@ private: // parse the command line args void connect_consumers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec - ACE_ENV_ARG_DECL); + RtecEventChannelAdmin::EventChannel_ptr local_ec); void disconnect_consumers (void); // Connect and disconnect the consumers. diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h index 1debc666c37..6aaff0c1448 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Driver.h @@ -33,8 +33,7 @@ class ECT_Driver public: virtual ~ECT_Driver (void); - virtual void shutdown_consumer (void* consumer_cookie - ACE_ENV_ARG_DECL_NOT_USED) = 0; + virtual void shutdown_consumer (void* consumer_cookie) = 0; // Callback method for consumers, each consumer will call this // method once it receives all the shutdown events from the // suppliers. diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp index b5b04c3e371..49efa019ecf 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp @@ -41,8 +41,7 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, int burst_pause, int type_start, int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) + RtecEventChannelAdmin::EventChannel_ptr ec) { this->burst_count_ = burst_count; this->burst_size_ = burst_size; @@ -52,7 +51,7 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, this->type_count_ = type_count; RtecScheduler::handle_t rt_info = - scheduler->create (name ACE_ENV_ARG_PARAMETER); + scheduler->create (name); ACE_Time_Value tv (0, burst_pause); RtecScheduler::Period_t rate = tv.usec () * 10; @@ -71,8 +70,7 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, RtecScheduler::VERY_LOW_IMPORTANCE, time, 1, - RtecScheduler::OPERATION - ACE_ENV_ARG_PARAMETER); + RtecScheduler::OPERATION); this->supplier_id_ = ACE::crc32 (name); ACE_DEBUG ((LM_DEBUG, "ID for <%s> is %04.4x\n", name, @@ -99,8 +97,7 @@ Test_Supplier::connect (RtecScheduler::Scheduler_ptr scheduler, this->supplier_._this (); this->consumer_proxy_->connect_push_supplier (objref.in (), - qos.get_SupplierQOS () - ACE_ENV_ARG_PARAMETER); + qos.get_SupplierQOS ()); } void @@ -118,15 +115,14 @@ Test_Supplier::disconnect (void) PortableServer::POA_var poa = this->supplier_._default_POA (); PortableServer::ObjectId_var id = - poa->servant_to_id (&this->supplier_ ACE_ENV_ARG_PARAMETER); - poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); + poa->servant_to_id (&this->supplier_); + poa->deactivate_object (id.in ()); } int Test_Supplier::svc () { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { // Initialize a time value to pace the test ACE_Time_Value tv (0, this->burst_pause_); @@ -174,7 +170,7 @@ Test_Supplier::svc () ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, request_start); // ACE_DEBUG ((LM_DEBUG, "(%t) supplier push event\n")); - this->consumer_proxy ()->push (event ACE_ENV_ARG_PARAMETER); + this->consumer_proxy ()->push (event); ACE_hrtime_t end = ACE_OS::gethrtime (); this->throughput_.sample (end - test_start, @@ -197,20 +193,19 @@ Test_Supplier::svc () ACE_hrtime_t request_start = ACE_OS::gethrtime (); ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, request_start); - this->consumer_proxy ()->push(event ACE_ENV_ARG_PARAMETER); + this->consumer_proxy ()->push(event); ACE_hrtime_t end = ACE_OS::gethrtime (); this->throughput_.sample (end - test_start, end - request_start); } - ACE_CATCH (CORBA::SystemException, sys_ex) + catch (const CORBA::SystemException& sys_ex) { - ACE_PRINT_EXCEPTION (sys_ex, "SYS_EX"); + sys_ex._tao_print_exception ("SYS_EX"); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "NON SYS EX"); + ex._tao_print_exception ("NON SYS EX"); } - ACE_ENDTRY; ACE_DEBUG ((LM_DEBUG, "Supplier %4.4x completed\n", diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h index ec0f8e02ccd..073e85e601d 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h @@ -45,8 +45,7 @@ public: int burst_pause, int type_start, int type_count, - RtecEventChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL); + RtecEventChannelAdmin::EventChannel_ptr ec); // This method connects the supplier to the EC. void disconnect (void); diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp index 4cf395bd7c6..8a052c303a1 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.cpp @@ -46,22 +46,20 @@ ECT_Supplier_Driver::~ECT_Supplier_Driver (void) } void -ECT_Supplier_Driver::shutdown_consumer (void* - ACE_ENV_ARG_DECL_NOT_USED) +ECT_Supplier_Driver::shutdown_consumer (void*) { } int ECT_Supplier_Driver::run (int argc, char* argv[]) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -69,7 +67,7 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); @@ -136,7 +134,7 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) } CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("NameService"); if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -144,38 +142,35 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); + CosNaming::NamingContext::_narrow (naming_obj.in ()); CosNaming::Name schedule_name (1); schedule_name.length (1); schedule_name[0].id = CORBA::string_dup ("ScheduleService"); CORBA::Object_var sched_obj = - naming_context->resolve (schedule_name ACE_ENV_ARG_PARAMETER); + naming_context->resolve (schedule_name); if (CORBA::is_nil (sched_obj.in ())) return 1; RtecScheduler::Scheduler_var scheduler = - RtecScheduler::Scheduler::_narrow (sched_obj.in () - ACE_ENV_ARG_PARAMETER); + RtecScheduler::Scheduler::_narrow (sched_obj.in ()); 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); + naming_context->resolve (name); RtecEventChannelAdmin::EventChannel_var channel; if (CORBA::is_nil (ec_obj.in ())) channel = RtecEventChannelAdmin::EventChannel::_nil (); else - channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in () - ACE_ENV_ARG_PARAMETER); + channel = RtecEventChannelAdmin::EventChannel::_narrow (ec_obj.in ()); poa_manager->activate (); this->connect_suppliers (scheduler.in (), - channel.in () - ACE_ENV_ARG_PARAMETER); + channel.in ()); ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); @@ -200,29 +195,27 @@ ECT_Supplier_Driver::run (int argc, char* argv[]) // @@ Deactivate the suppliers (as CORBA Objects?) - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); + root_poa->destroy (1, 1); orb->destroy (); ACE_DEBUG ((LM_DEBUG, "orb and poa destroyed\n")); } - ACE_CATCH (CORBA::SystemException, sys_ex) + catch (const CORBA::SystemException& sys_ex) { - ACE_PRINT_EXCEPTION (sys_ex, "SYS_EX"); + sys_ex._tao_print_exception ("SYS_EX"); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "NON SYS EX"); + ex._tao_print_exception ("NON SYS EX"); } - ACE_ENDTRY; return 0; } void ECT_Supplier_Driver::connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel - ACE_ENV_ARG_DECL) + RtecEventChannelAdmin::EventChannel_ptr channel) { for (int i = 0; i < this->n_suppliers_; ++i) { @@ -239,8 +232,7 @@ ECT_Supplier_Driver::connect_suppliers this->burst_pause_, this->type_start_, this->type_count_, - channel - ACE_ENV_ARG_PARAMETER); + channel); } } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h index 71f06bf4de8..27f364428cb 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier_Driver.h @@ -34,8 +34,7 @@ public: ECT_Supplier_Driver (void); virtual ~ECT_Supplier_Driver (void); - virtual void shutdown_consumer (void* consumer_cookie - ACE_ENV_ARG_DECL_NOT_USED); + virtual void shutdown_consumer (void* consumer_cookie); // Not used.... enum { @@ -51,8 +50,7 @@ private: // parse the command line args void connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec - ACE_ENV_ARG_DECL); + RtecEventChannelAdmin::EventChannel_ptr local_ec); void disconnect_suppliers (void); // Connect the suppliers. diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp index 5a3c157b5d8..490fe9dd72f 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp @@ -63,18 +63,17 @@ ECT_Throughput::~ECT_Throughput (void) int ECT_Throughput::run (int argc, char* argv[]) { - ACE_TRY_NEW_ENV + try { // Calibrate the high resolution timer *before* starting the // test. ACE_High_Res_Timer::calibrate (); this->orb_ = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA" - ACE_ENV_ARG_PARAMETER); + this->orb_->resolve_initial_references("RootPOA"); if (CORBA::is_nil (poa_object.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -82,7 +81,7 @@ ECT_Throughput::run (int argc, char* argv[]) 1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (); @@ -184,8 +183,7 @@ ECT_Throughput::run (int argc, char* argv[]) #if 0 CORBA::Object_var naming_obj = - this->orb_->resolve_initial_references ("NameService" - ACE_ENV_ARG_PARAMETER); + this->orb_->resolve_initial_references ("NameService"); if (CORBA::is_nil (naming_obj.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -193,7 +191,7 @@ ECT_Throughput::run (int argc, char* argv[]) 1); CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); + CosNaming::NamingContext::_narrow (naming_obj.in ()); // This is the name we (potentially) register the Scheduling // Service in the Naming Service. @@ -202,12 +200,12 @@ ECT_Throughput::run (int argc, char* argv[]) schedule_name[0].id = CORBA::string_dup ("ScheduleService"); CORBA::String_var str = - this->orb_->object_to_string (scheduler.in () ACE_ENV_ARG_PARAMETER); + this->orb_->object_to_string (scheduler.in ()); 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); + naming_context->rebind (schedule_name, scheduler.in ()); ACE_Scheduler_Factory::use_config (naming_context.in ()); #endif /* 0 */ @@ -229,13 +227,12 @@ ECT_Throughput::run (int argc, char* argv[]) ec_impl->_this (); this->connect_consumers (scheduler.in (), - channel.in () ACE_ENV_ARG_PARAMETER); + channel.in ()); ACE_DEBUG ((LM_DEBUG, "connected consumer(s)\n")); this->connect_suppliers (scheduler.in (), - channel.in () - ACE_ENV_ARG_PARAMETER); + channel.in ()); ACE_DEBUG ((LM_DEBUG, "connected supplier(s)\n")); @@ -271,8 +268,8 @@ ECT_Throughput::run (int argc, char* argv[]) PortableServer::POA_var poa = ec_impl->_default_POA (); PortableServer::ObjectId_var id = - poa->servant_to_id (ec_impl.get () ACE_ENV_ARG_PARAMETER); - poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); + poa->servant_to_id (ec_impl.get ()); + poa->deactivate_object (id.in ()); ACE_DEBUG ((LM_DEBUG, "EC deactivated\n")); } @@ -282,29 +279,26 @@ ECT_Throughput::run (int argc, char* argv[]) PortableServer::POA_var poa = scheduler_impl._default_POA (); PortableServer::ObjectId_var id = - poa->servant_to_id (&scheduler_impl ACE_ENV_ARG_PARAMETER); - poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER); + poa->servant_to_id (&scheduler_impl); + poa->deactivate_object (id.in ()); ACE_DEBUG ((LM_DEBUG, "scheduler deactivated\n")); } } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "ECT_Throughput::run"); + ex._tao_print_exception ("ECT_Throughput::run"); } - ACE_CATCHALL + catch (...) { ACE_ERROR ((LM_ERROR, "non-corba exception raised\n")); } - ACE_ENDTRY; return 0; } void -ECT_Throughput::shutdown_consumer (void* - ACE_ENV_ARG_DECL_NOT_USED) +ECT_Throughput::shutdown_consumer (void*) { // int ID = // (reinterpret_cast (consumer_cookie) @@ -318,15 +312,14 @@ ECT_Throughput::shutdown_consumer (void* { ACE_DEBUG ((LM_DEBUG, "(%t) shutting down the ORB\n")); - // Not needed: this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); + // Not needed: this->orb_->shutdown (0); } } void ECT_Throughput::connect_consumers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel - ACE_ENV_ARG_DECL) + RtecEventChannelAdmin::EventChannel_ptr channel) { { ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); @@ -349,16 +342,14 @@ ECT_Throughput::connect_consumers buf, start, this->consumer_type_count_, - channel - ACE_ENV_ARG_PARAMETER); + channel); } } void ECT_Throughput::connect_suppliers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr channel - ACE_ENV_ARG_DECL) + RtecEventChannelAdmin::EventChannel_ptr channel) { for (int i = 0; i < this->n_suppliers_; ++i) { @@ -376,8 +367,7 @@ ECT_Throughput::connect_suppliers this->burst_pause_, start, this->supplier_type_count_, - channel - ACE_ENV_ARG_PARAMETER); + channel); } } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h index 9cfadae7a92..cf7a13ac3ad 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.h @@ -43,8 +43,7 @@ public: int run (int argc, char* argv[]); // Execute the test. - virtual void shutdown_consumer (void* consumer_cookie - ACE_ENV_ARG_DECL_NOT_USED); + virtual void shutdown_consumer (void* consumer_cookie); // Callback method for consumers, each consumer will call this // method once it receives all the shutdown events from the // suppliers. @@ -54,14 +53,12 @@ private: // parse the command line args void connect_consumers (RtecScheduler::Scheduler_ptr scheduler, - RtecEventChannelAdmin::EventChannel_ptr local_ec - ACE_ENV_ARG_DECL); + RtecEventChannelAdmin::EventChannel_ptr local_ec); 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); + RtecEventChannelAdmin::EventChannel_ptr local_ec); void disconnect_suppliers (void); // Connect the suppliers. -- cgit v1.2.1