summaryrefslogtreecommitdiff
path: root/TAO/examples/Kokyu_dsrt_schedulers/mif_example
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:17:52 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:17:52 +0000
commit2ee7b7eed4c0cc10f4ec25b186b04202af01b565 (patch)
tree08a8a649c90559cf5b2228c1caad15515902613e /TAO/examples/Kokyu_dsrt_schedulers/mif_example
parentc979767a00db4ea1299af482033a68829cc16675 (diff)
downloadATCD-2ee7b7eed4c0cc10f4ec25b186b04202af01b565.tar.gz
ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/examples/Kokyu_dsrt_schedulers/mif_example')
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/mif_example/client.cpp35
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/mif_example/server.cpp34
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp7
-rw-r--r--TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.h2
4 files changed, 32 insertions, 46 deletions
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/client.cpp b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/client.cpp
index 7454008a5d5..11bd0f4b59d 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/client.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/client.cpp
@@ -138,19 +138,19 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "(%t): main thread prio is %d\n", prio));
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object (ior);
Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ Simple_Server::_narrow (object.in ());
if (CORBA::is_nil (server.in ()))
{
@@ -164,12 +164,10 @@ main (int argc, char *argv[])
{
ACE_DEBUG ((LM_DEBUG, "Dyn Sched enabled\n"));
CORBA::Object_ptr manager_obj =
- orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RTSchedulerManager");
TAO_RTScheduler_Manager_var manager =
- TAO_RTScheduler_Manager::_narrow (manager_obj
- ACE_ENV_ARG_PARAMETER);
+ TAO_RTScheduler_Manager::_narrow (manager_obj);
Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type;
if (enable_yield)
@@ -190,11 +188,10 @@ main (int argc, char *argv[])
manager->rtscheduler (scheduler);
CORBA::Object_var object =
- orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RTScheduler_Current");
current =
- RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ RTScheduling::Current::_narrow (object.in ());
}
@@ -233,8 +230,7 @@ main (int argc, char *argv[])
CORBA::Policy_ptr implicit_sched_param = 0;
current->begin_scheduling_segment (0,
sched_param_policy.in (),
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
+ implicit_sched_param);
}
ACE_DEBUG ((LM_DEBUG, "(%t): about to call server shutdown\n"));
@@ -245,20 +241,19 @@ main (int argc, char *argv[])
if (enable_dynamic_scheduling)
{
- current->end_scheduling_segment (0 ACE_ENV_ARG_PARAMETER);
+ current->end_scheduling_segment (0);
}
}
scheduler->shutdown ();
ACE_DEBUG ((LM_DEBUG, "scheduler shutdown done\n"));
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ ACE_PRINT_EXCEPTION (ex,
"Exception caught:");
return 1;
}
- ACE_ENDTRY;
return 0;
}
@@ -285,7 +280,6 @@ Worker::Worker (CORBA::ORB_ptr orb,
int
Worker::svc (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
const char * name = 0;
/*
ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to sleep for %d sec\n", sleep_time_));
@@ -324,13 +318,12 @@ Worker::svc (void)
ACE_DEBUG ((LM_DEBUG, "(%t|%T):before begin_sched_segment\n"));
scheduler_current_->begin_scheduling_segment (name,
sched_param_policy.in (),
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
+ implicit_sched_param);
ACE_DEBUG ((LM_DEBUG, "(%t|%T):after begin_sched_segment\n"));
}
ACE_DEBUG ((LM_DEBUG, "(%t|%T):about to make two way call\n"));
- server_->test_method (server_load_ ACE_ENV_ARG_PARAMETER);
+ server_->test_method (server_load_);
ACE_DEBUG ((LM_DEBUG, "(%t|%T):two way call done\n"));
if (enable_dynamic_scheduling)
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/server.cpp b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/server.cpp
index 9e6ba4f9394..67a475b0fd1 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/server.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/server.cpp
@@ -95,13 +95,13 @@ main (int argc, char *argv[])
task_stats.init (100000);
- ACE_TRY_NEW_ENV
+ 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,
@@ -109,7 +109,7 @@ main (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 ();
@@ -120,12 +120,10 @@ main (int argc, char *argv[])
if (enable_dynamic_scheduling)
{
CORBA::Object_ptr manager_obj =
- orb->resolve_initial_references ("RTSchedulerManager"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RTSchedulerManager");
TAO_RTScheduler_Manager_var manager =
- TAO_RTScheduler_Manager::_narrow (manager_obj
- ACE_ENV_ARG_PARAMETER);
+ TAO_RTScheduler_Manager::_narrow (manager_obj);
Kokyu::DSRT_Dispatcher_Impl_t disp_impl_type;
if (enable_yield)
@@ -146,11 +144,10 @@ main (int argc, char *argv[])
manager->rtscheduler (scheduler);
CORBA::Object_var object =
- orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RTScheduler_Current");
current =
- RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ RTScheduling::Current::_narrow (object.in ());
}
Simple_Server_i server_impl (orb.in (),
@@ -162,7 +159,7 @@ main (int argc, char *argv[])
server_impl._this ();
CORBA::String_var ior =
- orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
+ orb->object_to_string (server.in ());
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
@@ -208,13 +205,12 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "shutting down scheduler\n"));
scheduler->shutdown ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ ACE_PRINT_EXCEPTION (ex,
"Exception caught:");
return 1;
}
- ACE_ENDTRY;
ACE_DEBUG ((LM_DEBUG, "Exiting main...\n"));
task_stats.dump_samples ("timeline.txt",
@@ -233,17 +229,15 @@ Worker::Worker (CORBA::ORB_ptr orb)
int
Worker::svc (void)
{
- ACE_DECLARE_NEW_CORBA_ENV;
ACE_Time_Value tv(120);
- ACE_TRY
+ try
{
- this->orb_->run (tv ACE_ENV_ARG_PARAMETER);
+ this->orb_->run (tv);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
}
- ACE_ENDTRY;
ACE_DEBUG ((LM_DEBUG, "(%t|%T): Worker thread exiting...\n"));
return 0;
}
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp
index 5fc86805595..6ac6bf963e1 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp
+++ b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp
@@ -14,7 +14,7 @@
ACE_RCSID(MT_Server, test_i, "$Id$")
CORBA::Long
-Simple_Server_i::test_method (CORBA::Long exec_duration ACE_ENV_ARG_DECL)
+Simple_Server_i::test_method (CORBA::Long exec_duration)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_hthread_t thr_handle;
@@ -102,8 +102,7 @@ Simple_Server_i::test_method (CORBA::Long exec_duration ACE_ENV_ARG_DECL)
CORBA::Policy_ptr implicit_sched_param = 0;
current_->update_scheduling_segment (name,
sched_param_policy.in (),
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
+ implicit_sched_param);
yield_count_down_time = yield_interval;
yield_count_down.start ();
}
@@ -126,5 +125,5 @@ Simple_Server_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG, "shutdown request from client\n"));
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
}
diff --git a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.h b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.h
index 50c1763e4dd..45c7c4449fc 100644
--- a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.h
+++ b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.h
@@ -36,7 +36,7 @@ public:
// ctor
// = The Simple_Server methods.
- CORBA::Long test_method (CORBA::Long x ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Long test_method (CORBA::Long x)
ACE_THROW_SPEC ((CORBA::SystemException));
void shutdown (void)