summaryrefslogtreecommitdiff
path: root/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp')
-rw-r--r--TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp110
1 files changed, 37 insertions, 73 deletions
diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
index 5019ee6ae5d..b8ee3b265c1 100644
--- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
+++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
@@ -8,61 +8,53 @@
ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> server_guid_counter;
RTCORBA::Priority
-Segment_Sched_Param_Policy::value (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Segment_Sched_Param_Policy::value (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return this->value_;
}
void
-Segment_Sched_Param_Policy::value (RTCORBA::Priority value
- ACE_ENV_ARG_DECL_NOT_USED)
+Segment_Sched_Param_Policy::value (RTCORBA::Priority value)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->value_ = value;
}
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->value (this->value_ ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Policy::_nil ());
+ copy->value (this->value_);
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))
{
}
Fixed_Priority_Scheduler::Fixed_Priority_Scheduler (CORBA::ORB_ptr orb)
{
- ACE_TRY_NEW_ENV
+ try
{
CORBA::Object_var object =
- orb->resolve_initial_references ("RTScheduler_Current"
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->resolve_initial_references ("RTScheduler_Current");
this->current_ =
- RTScheduling::Current::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ RTScheduling::Current::_narrow (object.in ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
+ ex._tao_print_exception ("Caught exception:");
}
- ACE_ENDTRY;
}
Fixed_Priority_Scheduler::~Fixed_Priority_Scheduler (void)
@@ -70,8 +62,7 @@ Fixed_Priority_Scheduler::~Fixed_Priority_Scheduler (void)
}
FP_Scheduling::SegmentSchedulingParameterPolicy_ptr
-Fixed_Priority_Scheduler::create_segment_scheduling_parameter (RTCORBA::Priority segment_priority
- ACE_ENV_ARG_DECL)
+Fixed_Priority_Scheduler::create_segment_scheduling_parameter (RTCORBA::Priority segment_priority)
ACE_THROW_SPEC ((CORBA::SystemException))
{
FP_Scheduling::SegmentSchedulingParameterPolicy_ptr segment_policy;
@@ -94,8 +85,7 @@ void
Fixed_Priority_Scheduler::begin_new_scheduling_segment (const RTScheduling::Current::IdType &,
const char *,
CORBA::Policy_ptr /*sched_policy*/,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Policy_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
{
@@ -105,41 +95,34 @@ void
Fixed_Priority_Scheduler::begin_nested_scheduling_segment (const RTScheduling::Current::IdType &guid,
const char *name,
CORBA::Policy_ptr sched_param,
- CORBA::Policy_ptr implicit_sched_param
- ACE_ENV_ARG_DECL)
+ CORBA::Policy_ptr implicit_sched_param)
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
{
this->begin_new_scheduling_segment (guid,
name,
sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ implicit_sched_param);
}
void
Fixed_Priority_Scheduler::update_scheduling_segment (const RTScheduling::Current::IdType &guid,
const char *name,
CORBA::Policy_ptr sched_param,
- CORBA::Policy_ptr implicit_sched_param
- ACE_ENV_ARG_DECL)
+ CORBA::Policy_ptr implicit_sched_param)
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
{
this->begin_new_scheduling_segment (guid,
name,
sched_param,
- implicit_sched_param
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ implicit_sched_param);
}
void
Fixed_Priority_Scheduler::end_scheduling_segment (const RTScheduling::Current::IdType &,
- const char *
- ACE_ENV_ARG_DECL_NOT_USED)
+ const char *)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
@@ -147,8 +130,7 @@ Fixed_Priority_Scheduler::end_scheduling_segment (const RTScheduling::Current::I
void
Fixed_Priority_Scheduler::end_nested_scheduling_segment (const RTScheduling::Current::IdType &,
const char *,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Policy_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -156,8 +138,7 @@ Fixed_Priority_Scheduler::end_nested_scheduling_segment (const RTScheduling::Cur
void
-Fixed_Priority_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_info
- ACE_ENV_ARG_DECL)
+Fixed_Priority_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_info)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -178,13 +159,10 @@ Fixed_Priority_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_p
srv_con->context_id = Client_Interceptor::SchedulingInfo;
srv_con->context_data.length (sizeof (size_t));
ACE_OS::memcpy (srv_con->context_data.get_buffer (),
- current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->get_buffer (),
+ current_->id ()->get_buffer (),
sizeof (size_t));
- ACE_CHECK;
request_info->add_request_service_context (*srv_con,
- 0
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ 0);
}
@@ -193,15 +171,12 @@ Fixed_Priority_Scheduler::receive_request (PortableInterceptor::ServerRequestInf
RTScheduling::Current::IdType_out guid_out,
CORBA::String_out /*name*/,
CORBA::Policy_out /*sched_param*/,
- CORBA::Policy_out /*implicit_sched_param*/
- ACE_ENV_ARG_DECL)
+ CORBA::Policy_out /*implicit_sched_param*/)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
IOP::ServiceContext* serv_cxt =
- request_info->get_request_service_context (Server_Interceptor::SchedulingInfo
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ request_info->get_request_service_context (Server_Interceptor::SchedulingInfo);
if (serv_cxt != 0)
{
@@ -241,89 +216,80 @@ Fixed_Priority_Scheduler::receive_request (PortableInterceptor::ServerRequestInf
}
void
-Fixed_Priority_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
-Fixed_Priority_Scheduler::send_exception (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::send_exception (PortableInterceptor::ServerRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
}
void
-Fixed_Priority_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
}
void
-Fixed_Priority_Scheduler::send_poll (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::send_poll (PortableInterceptor::ClientRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
}
void
-Fixed_Priority_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
-Fixed_Priority_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
}
void
-Fixed_Priority_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
}
void
-Fixed_Priority_Scheduler::cancel (const RTScheduling::Current::IdType &
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::cancel (const RTScheduling::Current::IdType &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
CORBA::PolicyList*
-Fixed_Priority_Scheduler::scheduling_policies (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::scheduling_policies (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
}
void
-Fixed_Priority_Scheduler::scheduling_policies (const CORBA::PolicyList &
- ACE_ENV_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::scheduling_policies (const CORBA::PolicyList &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
CORBA::PolicyList*
-Fixed_Priority_Scheduler::poa_policies (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::poa_policies (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
}
char *
-Fixed_Priority_Scheduler::scheduling_discipline_name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Fixed_Priority_Scheduler::scheduling_discipline_name (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
@@ -331,8 +297,7 @@ Fixed_Priority_Scheduler::scheduling_discipline_name (ACE_ENV_SINGLE_ARG_DECL_NO
RTScheduling::ResourceManager_ptr
Fixed_Priority_Scheduler::create_resource_manager (const char *,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Policy_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
@@ -341,8 +306,7 @@ Fixed_Priority_Scheduler::create_resource_manager (const char *,
void
Fixed_Priority_Scheduler::set_scheduling_parameter (PortableServer::Servant &,
const char *,
- CORBA::Policy_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ CORBA::Policy_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}