3 #include "ace/Atomic_Op.h"
4 #include "tao/RTScheduling/Request_Interceptor.h"
6 TAO_Scheduler::TAO_Scheduler (CORBA::ORB_ptr orb
)
8 CORBA::Object_var current_obj
=
9 orb
->resolve_initial_references ("RTScheduler_Current");
11 current_
= RTScheduling::Current::_narrow (current_obj
.in ());
14 TAO_Scheduler::~TAO_Scheduler ()
19 TAO_Scheduler::scheduling_policies ()
25 TAO_Scheduler::scheduling_policies (const CORBA::PolicyList
&)
30 TAO_Scheduler::poa_policies ()
36 TAO_Scheduler::scheduling_discipline_name ()
41 RTScheduling::ResourceManager_ptr
42 TAO_Scheduler::create_resource_manager (const char *,
49 TAO_Scheduler::set_scheduling_parameter (PortableServer::Servant
&,
56 TAO_Scheduler::begin_new_scheduling_segment (const RTScheduling::Current::IdType
&,
64 TAO_Scheduler::begin_nested_scheduling_segment (const RTScheduling::Current::IdType
&,
72 TAO_Scheduler::update_scheduling_segment (const RTScheduling::Current::IdType
&,
80 TAO_Scheduler::end_scheduling_segment (const RTScheduling::Current::IdType
&,
86 TAO_Scheduler::end_nested_scheduling_segment (const RTScheduling::Current::IdType
&,
94 TAO_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_info
)
96 IOP::ServiceContext srv_con
;
97 srv_con
.context_id
= Client_Interceptor::SchedulingInfo
;
98 srv_con
.context_data
.length (sizeof (size_t));
99 RTScheduling::Current::IdType_var id
= this->current_
->id ();
100 ACE_OS::memcpy (srv_con
.context_data
.get_buffer (),
103 request_info
->add_request_service_context (srv_con
,
108 TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr request_info
,
109 RTScheduling::Current::IdType_out guid_out
,
110 CORBA::String_out
/*name*/,
111 CORBA::Policy_out
/*sched_param*/,
112 CORBA::Policy_out
/*implicit_sched_param*/)
114 IOP::ServiceContext_var serv_cxt
;
118 serv_cxt
= request_info
->get_request_service_context (Server_Interceptor::SchedulingInfo
);
121 ACE_OS::memcpy (&gu_id
,
122 serv_cxt
->context_data
.get_buffer (),
123 serv_cxt
->context_data
.length ());
125 ACE_DEBUG ((LM_DEBUG
,
129 RTScheduling::Current::IdType
* guid
;
131 RTScheduling::Current::IdType
);
133 guid
->length (sizeof (size_t));
134 ACE_OS::memcpy (guid
->get_buffer (),
135 serv_cxt
->context_data
.get_buffer (),
140 catch (const CORBA::Exception
&)
142 ACE_DEBUG ((LM_DEBUG
,
143 "Invalid Service Context\n"));
148 TAO_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr
)
153 TAO_Scheduler::send_exception (PortableInterceptor::ServerRequestInfo_ptr
)
158 TAO_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr
)
163 TAO_Scheduler::send_poll (PortableInterceptor::ClientRequestInfo_ptr
)
168 TAO_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
)
173 TAO_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
)
178 TAO_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
)
183 TAO_Scheduler::cancel (const RTScheduling::Current::IdType
&)