summaryrefslogtreecommitdiff
path: root/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-01-24 15:39:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-01-24 15:39:09 +0000
commitc801f87e59c00f72bdeb5ce7bd0d276674665bac (patch)
tree70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
parent98c0b37d4714ff774fc3ada8c9ee893c719af714 (diff)
downloadATCD-c801f87e59c00f72bdeb5ce7bd0d276674665bac.tar.gz
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp')
-rw-r--r--TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp56
1 files changed, 19 insertions, 37 deletions
diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
index f692891e326..373f16b138b 100644
--- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
+++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
@@ -31,7 +31,7 @@ DT::resume (void)
}
CORBA::Short
-Segment_Sched_Param_Policy::importance (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Segment_Sched_Param_Policy::importance (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return this->importance_;
@@ -46,23 +46,21 @@ Segment_Sched_Param_Policy::importance (CORBA::Short importance
}
CORBA::Policy_ptr
-Segment_Sched_Param_Policy::copy (ACE_ENV_SINGLE_ARG_DECL)
+Segment_Sched_Param_Policy::copy (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
Segment_Sched_Param_Policy *copy = 0;
ACE_NEW_THROW_EX (copy,
Segment_Sched_Param_Policy,
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (CORBA::Policy::_nil ());
copy->importance (this->importance_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Policy::_nil ());
return copy;
}
void
-Segment_Sched_Param_Policy::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Segment_Sched_Param_Policy::destroy (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
@@ -76,11 +74,9 @@ MIF_Scheduler::MIF_Scheduler (CORBA::ORB_ptr orb)
CORBA::Object_var object =
orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
this->current_ =
RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
wait_ = 0;
}
@@ -163,8 +159,7 @@ MIF_Scheduler::begin_new_scheduling_segment (const RTScheduling::Current::IdType
MIF_Scheduling::SegmentSchedulingParameterPolicy_var sched_param =
MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (sched_policy);
- CORBA::Short desired_priority = sched_param->importance (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CORBA::Short desired_priority = sched_param->importance ();
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
@@ -203,7 +198,6 @@ MIF_Scheduler::begin_nested_scheduling_segment (const RTScheduling::Current::IdT
sched_param,
implicit_sched_param
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
}
void
@@ -223,7 +217,7 @@ MIF_Scheduler::update_scheduling_segment (const RTScheduling::Current::IdType &/
MIF_Scheduling::SegmentSchedulingParameterPolicy_var sched_param =
MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (sched_policy);
- CORBA::Short desired_priority = sched_param->importance (ACE_ENV_SINGLE_ARG_PARAMETER);
+ CORBA::Short desired_priority = sched_param->importance ();
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
@@ -303,16 +297,14 @@ MIF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_
PortableInterceptor::ForwardRequest))
{
MIF_Scheduling::SegmentSchedulingParameterPolicy_var sched_param_var =
- MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
+ MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter ());
IOP::ServiceContext* srv_con = new IOP::ServiceContext;
srv_con->context_id = Client_Interceptor::SchedulingInfo;
- int guid_length = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->length ();
- ACE_CHECK;
+ int guid_length = current_->id ()->length ();
- RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ RTScheduling::Current::IdType* guid = current_->id ();
CORBA::Octet *seq_buf = CORBA::OctetSeq::allocbuf (guid_length);
ACE_OS::memcpy (seq_buf,
@@ -343,7 +335,6 @@ MIF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_
request_info->add_request_service_context (*srv_con,
0
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
lock_.acquire ();
if (ready_que_.message_count () > 0)
@@ -361,7 +352,6 @@ MIF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_
current_->the_priority (priority + 1
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
ACE_Thread::self (current);
if (ACE_Thread::getprio (current, priority) == -1)
@@ -464,8 +454,7 @@ MIF_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr
ACE_THROW_SPEC ((CORBA::SystemException))
{
- RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ RTScheduling::Current::IdType* guid = current_->id ();
size_t count;
ACE_OS::memcpy (&count,
@@ -514,8 +503,7 @@ MIF_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr
{
if (TAO_debug_level > 0)
{
- RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ RTScheduling::Current::IdType* guid = current_->id ();
size_t count;
ACE_OS::memcpy (&count,
@@ -555,8 +543,7 @@ MIF_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
{
MIF_Scheduling::SegmentSchedulingParameterPolicy_var sched_param_var =
- MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
+ MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter ());
int importance = sched_param_var->importance ();
CORBA::Octet *int_buf = CORBA::OctetSeq::allocbuf (sizeof (importance));
@@ -564,7 +551,7 @@ MIF_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
&importance,
sizeof (importance));
- RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ RTScheduling::Current::IdType* guid = current_->id ();
size_t gu_id;
ACE_OS::memcpy (&gu_id,
@@ -595,7 +582,6 @@ MIF_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
current_->the_priority (priority - 1
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
new_dt->suspend ();
lock_.release ();
}
@@ -607,8 +593,7 @@ MIF_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
PortableInterceptor::ForwardRequest))
{
MIF_Scheduling::SegmentSchedulingParameterPolicy_var sched_param_var =
- MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
+ MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter ());
int importance = sched_param_var->importance ();
CORBA::Octet *int_buf = CORBA::OctetSeq::allocbuf (sizeof (importance));
@@ -616,7 +601,7 @@ MIF_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
&importance,
sizeof (importance));
- RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ RTScheduling::Current::IdType* guid = current_->id ();
size_t gu_id;
ACE_OS::memcpy (&gu_id,
@@ -641,7 +626,6 @@ MIF_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
current_->the_priority (priority - 1
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
new_dt->suspend ();
lock_.release ();
}
@@ -653,8 +637,7 @@ MIF_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
PortableInterceptor::ForwardRequest))
{
MIF_Scheduling::SegmentSchedulingParameterPolicy_var sched_param_var =
- MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter (ACE_ENV_SINGLE_ARG_PARAMETER));
- ACE_CHECK;
+ MIF_Scheduling::SegmentSchedulingParameterPolicy::_narrow (current_->scheduling_parameter ());
int importance = sched_param_var->importance ();
CORBA::Octet *int_buf = CORBA::OctetSeq::allocbuf (sizeof (importance));
@@ -662,7 +645,7 @@ MIF_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
&importance,
sizeof (importance));
- RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
+ RTScheduling::Current::IdType* guid = current_->id ();
size_t gu_id;
ACE_OS::memcpy (&gu_id,
@@ -687,7 +670,6 @@ MIF_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
current_->the_priority (priority - 1
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
new_dt->suspend ();
lock_.release ();
}
@@ -700,7 +682,7 @@ MIF_Scheduler::cancel (const RTScheduling::Current::IdType &
}
CORBA::PolicyList*
-MIF_Scheduler::scheduling_policies (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+MIF_Scheduler::scheduling_policies (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
@@ -714,14 +696,14 @@ MIF_Scheduler::scheduling_policies (const CORBA::PolicyList &
}
CORBA::PolicyList*
-MIF_Scheduler::poa_policies (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+MIF_Scheduler::poa_policies (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
}
char *
-MIF_Scheduler::scheduling_discipline_name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+MIF_Scheduler::scheduling_discipline_name (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;