00001 #include "tao/RTCORBA/RT_Protocols_Hooks.h"
00002
00003 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00004
00005 #include "tao/RTCORBA/RT_Policy_i.h"
00006 #include "tao/RTCORBA/Priority_Mapping_Manager.h"
00007 #include "tao/RTCORBA/RT_Stub.h"
00008
00009 #include "tao/Stub.h"
00010 #include "tao/ORB_Core.h"
00011 #include "tao/MProfile.h"
00012 #include "tao/Service_Context.h"
00013 #include "tao/Acceptor_Registry.h"
00014 #include "tao/Thread_Lane_Resources.h"
00015 #include "tao/Protocol_Factory.h"
00016 #include "tao/Transport_Acceptor.h"
00017 #include "tao/Transport_Connector.h"
00018 #include "tao/TSS_Resources.h"
00019 #include "tao/Policy_Set.h"
00020 #include "tao/debug.h"
00021 #include "tao/CDR.h"
00022 #include "tao/SystemException.h"
00023
00024 #include "ace/Dynamic_Service.h"
00025 #include "ace/OS_NS_string.h"
00026
00027 ACE_RCSID (RTCORBA,
00028 RT_Protocols_Hooks,
00029 "$Id: RT_Protocols_Hooks.cpp 85406 2009-05-20 09:07:56Z johnnyw $")
00030
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032
00033 TAO_RT_Protocols_Hooks::TAO_RT_Protocols_Hooks (void)
00034 : orb_core_ (0)
00035 , current_ ()
00036 {
00037 }
00038
00039
00040 TAO_RT_Protocols_Hooks::~TAO_RT_Protocols_Hooks (void)
00041 {
00042 }
00043
00044 void
00045 TAO_RT_Protocols_Hooks::init_hooks (TAO_ORB_Core *orb_core)
00046 {
00047 this->orb_core_ = orb_core;
00048
00049
00050 CORBA::Object_var obj =
00051 orb_core->object_ref_table ().resolve_initial_reference (
00052 TAO_OBJID_PRIORITYMAPPINGMANAGER);
00053
00054 this->mapping_manager_ =
00055 TAO_Priority_Mapping_Manager::_narrow (obj.in ());
00056
00057
00058 CORBA::Object_var object =
00059 orb_core->object_ref_table ().resolve_initial_reference (
00060 TAO_OBJID_NETWORKPRIORITYMAPPINGMANAGER);
00061
00062 this->network_mapping_manager_ =
00063 TAO_Network_Priority_Mapping_Manager::_narrow (object.in ());
00064
00065 object =
00066 this->orb_core_->object_ref_table ().resolve_initial_reference (
00067 TAO_OBJID_RTCURRENT);
00068
00069 this->current_ = RTCORBA::Current::_narrow (object.in ());
00070
00071 }
00072
00073 RTCORBA::ProtocolProperties_ptr
00074 TAO_RT_Protocols_Hooks::server_protocol_properties (IOP::ProfileId protocol_tag,
00075 CORBA::Policy_ptr policy)
00076 {
00077 if (CORBA::is_nil (policy))
00078 return RTCORBA::ProtocolProperties::_nil ();
00079
00080 RTCORBA::ServerProtocolPolicy_var server_protocol_policy =
00081 RTCORBA::ServerProtocolPolicy::_narrow (policy);
00082
00083 if (CORBA::is_nil (server_protocol_policy.in ()))
00084 return RTCORBA::ProtocolProperties::_nil ();
00085
00086 TAO_ServerProtocolPolicy *server_protocols =
00087 dynamic_cast<TAO_ServerProtocolPolicy *> (server_protocol_policy.in ());
00088
00089 if (server_protocols == 0)
00090 return RTCORBA::ProtocolProperties::_nil ();
00091
00092
00093 RTCORBA::ProtocolList &protocols =
00094 server_protocols->protocols_rep ();
00095
00096 for (CORBA::ULong j = 0; j < protocols.length (); ++j)
00097 {
00098 if (protocols[j].protocol_type == protocol_tag)
00099 {
00100 return RTCORBA::ProtocolProperties::_duplicate (
00101 protocols[j].transport_protocol_properties.in ());
00102 }
00103 }
00104
00105 return RTCORBA::ProtocolProperties::_nil ();
00106 }
00107
00108 RTCORBA::ProtocolProperties_ptr
00109 TAO_RT_Protocols_Hooks::client_protocol_properties (IOP::ProfileId protocol_tag,
00110 CORBA::Policy_ptr policy)
00111 {
00112 if (CORBA::is_nil (policy))
00113 return RTCORBA::ProtocolProperties::_nil ();
00114
00115 RTCORBA::ClientProtocolPolicy_var client_protocol_policy =
00116 RTCORBA::ClientProtocolPolicy::_narrow (policy);
00117
00118 if (CORBA::is_nil (client_protocol_policy.in ()))
00119 return RTCORBA::ProtocolProperties::_nil ();
00120
00121 TAO_ClientProtocolPolicy *client_protocols =
00122 dynamic_cast<TAO_ClientProtocolPolicy *> (client_protocol_policy.in ());
00123
00124 if (client_protocols == 0)
00125 return RTCORBA::ProtocolProperties::_nil ();
00126
00127
00128 RTCORBA::ProtocolList &protocols =
00129 client_protocols->protocols_rep ();
00130
00131 for (CORBA::ULong j = 0; j < protocols.length (); ++j)
00132 {
00133 if (protocols[j].protocol_type == protocol_tag)
00134 {
00135 return RTCORBA::ProtocolProperties::_duplicate (
00136 protocols[j].transport_protocol_properties.in ());
00137 }
00138 }
00139
00140 return RTCORBA::ProtocolProperties::_nil ();
00141 }
00142
00143 RTCORBA::ProtocolProperties_ptr
00144 TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (
00145 IOP::ProfileId protocol_tag)
00146 {
00147 CORBA::Policy_var policy =
00148 this->orb_core_->get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL);
00149
00150 return this->server_protocol_properties (protocol_tag, policy.in ());
00151 }
00152
00153 RTCORBA::ProtocolProperties_ptr
00154 TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (
00155 IOP::ProfileId protocol_tag)
00156 {
00157 CORBA::Policy_var policy =
00158 this->orb_core_->get_cached_policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL);
00159
00160 return this->client_protocol_properties (protocol_tag, policy.in ());
00161 }
00162
00163 RTCORBA::ProtocolProperties_ptr
00164 TAO_RT_Protocols_Hooks::client_protocol_properties_at_object_level (
00165 IOP::ProfileId protocol_tag,
00166 TAO_Stub *stub)
00167 {
00168 CORBA::Policy_var policy =
00169 stub->get_cached_policy (TAO_CACHED_POLICY_RT_CLIENT_PROTOCOL);
00170
00171 return this->client_protocol_properties (protocol_tag, policy.in ());
00172 }
00173
00174 void
00175 TAO_RT_Protocols_Hooks::extract_protocol_properties (TAO_IIOP_Protocol_Properties &to,
00176 RTCORBA::ProtocolProperties_ptr from)
00177 {
00178 RTCORBA::TCPProtocolProperties_var protocol_properties =
00179 RTCORBA::TCPProtocolProperties::_narrow (from);
00180
00181 to.send_buffer_size_ = protocol_properties->send_buffer_size ();
00182 to.recv_buffer_size_ = protocol_properties->recv_buffer_size ();
00183 to.keep_alive_ = protocol_properties->keep_alive ();
00184 to.dont_route_ = protocol_properties->dont_route ();
00185 to.no_delay_ = protocol_properties->no_delay ();
00186 to.enable_network_priority_ = protocol_properties->enable_network_priority ();
00187 }
00188
00189 void
00190 TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &to)
00191 {
00192 RTCORBA::ProtocolProperties_var from =
00193 this->server_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP);
00194
00195 if (!CORBA::is_nil (from.in ()))
00196 this->extract_protocol_properties (to, from.in ());
00197 }
00198
00199 void
00200 TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (TAO_IIOP_Protocol_Properties &to)
00201 {
00202 RTCORBA::ProtocolProperties_var from =
00203 this->client_protocol_properties_at_orb_level (IOP::TAG_INTERNET_IOP);
00204
00205 if (!CORBA::is_nil (from.in ()))
00206 this->extract_protocol_properties (to, from.in ());
00207 }
00208
00209 void
00210 TAO_RT_Protocols_Hooks::extract_protocol_properties (
00211 TAO_UIOP_Protocol_Properties &to,
00212 RTCORBA::ProtocolProperties_ptr from)
00213 {
00214 RTCORBA::UnixDomainProtocolProperties_var protocol_properties =
00215 RTCORBA::UnixDomainProtocolProperties::_narrow (from);
00216
00217 to.send_buffer_size_ = protocol_properties->send_buffer_size ();
00218 to.recv_buffer_size_ = protocol_properties->recv_buffer_size ();
00219 }
00220
00221 void
00222 TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (
00223 TAO_UIOP_Protocol_Properties &to)
00224 {
00225 RTCORBA::ProtocolProperties_var from =
00226 this->server_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE);
00227
00228 if (!CORBA::is_nil (from.in ()))
00229 this->extract_protocol_properties (to, from.in ());
00230 }
00231
00232 void
00233 TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (
00234 TAO_UIOP_Protocol_Properties &to)
00235 {
00236 RTCORBA::ProtocolProperties_var from =
00237 this->client_protocol_properties_at_orb_level (TAO_TAG_UIOP_PROFILE);
00238
00239 if (!CORBA::is_nil (from.in ()))
00240 this->extract_protocol_properties (to, from.in ());
00241 }
00242
00243 void
00244 TAO_RT_Protocols_Hooks::extract_protocol_properties (
00245 TAO_SHMIOP_Protocol_Properties &to,
00246 RTCORBA::ProtocolProperties_ptr from)
00247 {
00248 RTCORBA::SharedMemoryProtocolProperties_var protocol_properties =
00249 RTCORBA::SharedMemoryProtocolProperties::_narrow (from);
00250
00251 to.preallocate_buffer_size_ = protocol_properties->preallocate_buffer_size ();
00252 to.mmap_filename_ = protocol_properties->mmap_filename ();
00253 to.mmap_lockname_ = protocol_properties->mmap_lockname ();
00254 }
00255
00256 void
00257 TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (
00258 TAO_SHMIOP_Protocol_Properties &to)
00259 {
00260 RTCORBA::ProtocolProperties_var from =
00261 this->server_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE);
00262
00263 if (!CORBA::is_nil (from.in ()))
00264 this->extract_protocol_properties (to, from.in ());
00265 }
00266
00267 void
00268 TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (
00269 TAO_SHMIOP_Protocol_Properties &to)
00270 {
00271 RTCORBA::ProtocolProperties_var from =
00272 this->client_protocol_properties_at_orb_level (TAO_TAG_SHMEM_PROFILE);
00273
00274 if (!CORBA::is_nil (from.in ()))
00275 this->extract_protocol_properties (to, from.in ());
00276 }
00277
00278 void
00279 TAO_RT_Protocols_Hooks::extract_protocol_properties (
00280 TAO_DIOP_Protocol_Properties &to,
00281 RTCORBA::ProtocolProperties_ptr from)
00282 {
00283 RTCORBA::UserDatagramProtocolProperties_var protocol_properties =
00284 RTCORBA::UserDatagramProtocolProperties::_narrow (from);
00285
00286 to.enable_network_priority_ = protocol_properties->enable_network_priority ();
00287 to.send_buffer_size_ = protocol_properties->send_buffer_size ();
00288 to.recv_buffer_size_ = protocol_properties->recv_buffer_size ();
00289 }
00290
00291 void
00292 TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (
00293 TAO_DIOP_Protocol_Properties &to)
00294 {
00295 RTCORBA::ProtocolProperties_var from =
00296 this->server_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE);
00297
00298 if (!CORBA::is_nil (from.in ()))
00299 this->extract_protocol_properties (to, from.in ());
00300 }
00301
00302 void
00303 TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (
00304 TAO_DIOP_Protocol_Properties &to)
00305 {
00306 RTCORBA::ProtocolProperties_var from =
00307 this->client_protocol_properties_at_orb_level (TAO_TAG_DIOP_PROFILE);
00308
00309 if (!CORBA::is_nil (from.in ()))
00310 this->extract_protocol_properties (to, from.in ());
00311 }
00312
00313 void
00314 TAO_RT_Protocols_Hooks::extract_protocol_properties (
00315 TAO_SCIOP_Protocol_Properties &to,
00316 RTCORBA::ProtocolProperties_ptr from)
00317 {
00318 RTCORBA::StreamControlProtocolProperties_var protocol_properties =
00319 RTCORBA::StreamControlProtocolProperties::_narrow (from);
00320
00321 to.send_buffer_size_ = protocol_properties->send_buffer_size ();
00322 to.recv_buffer_size_ = protocol_properties->recv_buffer_size ();
00323 to.keep_alive_ = protocol_properties->keep_alive ();
00324 to.dont_route_ = protocol_properties->dont_route ();
00325 to.no_delay_ = protocol_properties->no_delay ();
00326 to.enable_network_priority_ = protocol_properties->enable_network_priority ();
00327 }
00328
00329 void
00330 TAO_RT_Protocols_Hooks::server_protocol_properties_at_orb_level (
00331 TAO_SCIOP_Protocol_Properties &to)
00332 {
00333 RTCORBA::ProtocolProperties_var from =
00334 this->server_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE);
00335
00336 if (!CORBA::is_nil (from.in ()))
00337 this->extract_protocol_properties (to, from.in ());
00338 }
00339
00340 void
00341 TAO_RT_Protocols_Hooks::client_protocol_properties_at_orb_level (
00342 TAO_SCIOP_Protocol_Properties &to)
00343 {
00344 RTCORBA::ProtocolProperties_var from =
00345 this->client_protocol_properties_at_orb_level (TAO_TAG_SCIOP_PROFILE);
00346
00347 if (!CORBA::is_nil (from.in ()))
00348 this->extract_protocol_properties (to, from.in ());
00349 }
00350
00351 CORBA::Boolean
00352 TAO_RT_Protocols_Hooks::set_network_priority (
00353 IOP::ProfileId protocol_tag,
00354 RTCORBA::ProtocolProperties_ptr protocol_properties)
00355 {
00356 if (CORBA::is_nil (protocol_properties))
00357 return false;
00358
00359 if (protocol_tag == IOP::TAG_INTERNET_IOP)
00360 {
00361 RTCORBA::TCPProtocolProperties_var tcp_protocol_properties =
00362 RTCORBA::TCPProtocolProperties::_narrow (protocol_properties);
00363
00364 return tcp_protocol_properties->enable_network_priority ();
00365 }
00366
00367 if (protocol_tag == TAO_TAG_DIOP_PROFILE)
00368 {
00369 RTCORBA::UserDatagramProtocolProperties_var udp_protocol_properties =
00370 RTCORBA::UserDatagramProtocolProperties::_narrow (protocol_properties);
00371
00372 return udp_protocol_properties->enable_network_priority ();
00373 }
00374
00375 if (protocol_tag == TAO_TAG_SCIOP_PROFILE)
00376 {
00377 RTCORBA::StreamControlProtocolProperties_var sctp_protocol_properties =
00378 RTCORBA::StreamControlProtocolProperties::_narrow (protocol_properties);
00379
00380 return sctp_protocol_properties->enable_network_priority ();
00381 }
00382
00383 return false;
00384 }
00385
00386 CORBA::Boolean
00387 TAO_RT_Protocols_Hooks::set_client_network_priority (IOP::ProfileId protocol_tag,
00388 TAO_Stub *stub)
00389 {
00390 if (protocol_tag != IOP::TAG_INTERNET_IOP &&
00391 protocol_tag != TAO_TAG_DIOP_PROFILE &&
00392 protocol_tag != TAO_TAG_SCIOP_PROFILE)
00393 return false;
00394
00395 RTCORBA::ProtocolProperties_var protocol_properties =
00396 this->client_protocol_properties_at_object_level (protocol_tag, stub);
00397
00398 return this->set_network_priority (protocol_tag, protocol_properties.in ());
00399 }
00400
00401 CORBA::Boolean
00402 TAO_RT_Protocols_Hooks::set_server_network_priority (IOP::ProfileId protocol_tag,
00403 CORBA::Policy *policy)
00404 {
00405 if (protocol_tag != IOP::TAG_INTERNET_IOP &&
00406 protocol_tag != TAO_TAG_DIOP_PROFILE &&
00407 protocol_tag != TAO_TAG_SCIOP_PROFILE)
00408 return false;
00409
00410 RTCORBA::ProtocolProperties_var protocol_properties =
00411 this->server_protocol_properties (protocol_tag, policy);
00412
00413 return this->set_network_priority (protocol_tag, protocol_properties.in ());
00414 }
00415
00416 CORBA::Long
00417 TAO_RT_Protocols_Hooks::get_dscp_codepoint (void)
00418 {
00419 if (TAO_debug_level)
00420 ACE_DEBUG ((LM_DEBUG,
00421 "TAO_RT_Protocols_Hooks::get_dscp_codepoint\n"));
00422
00423 CORBA::Long codepoint = 0;
00424
00425 try
00426 {
00427
00428
00429
00430 RTCORBA::NetworkPriorityMapping *pm =
00431 this->network_mapping_manager_->mapping ();
00432
00433 CORBA::Short const priority = this->current_->the_priority ();
00434
00435 if (pm->to_network (priority, codepoint) == 0)
00436 {
00437 if (TAO_debug_level > 0)
00438 {
00439 ACE_ERROR ((LM_ERROR,
00440 "Cannot convert corba priority %d "
00441 "to network priority\n",
00442 priority));
00443 }
00444
00445 return -1;
00446 }
00447 }
00448 catch (const ::CORBA::Exception& ex)
00449 {
00450 if (TAO_debug_level > 0)
00451 {
00452 ex._tao_print_exception (
00453 "TAO_RT_Protocols_Hooks::get_dscp_codepoint");
00454 }
00455
00456 return -1;
00457 }
00458
00459 return codepoint;
00460 }
00461
00462 void
00463 TAO_RT_Protocols_Hooks::get_selector_hook (
00464 CORBA::Policy *model_policy,
00465 CORBA::Boolean &is_client_propagated,
00466 CORBA::Short &server_priority)
00467 {
00468 RTCORBA::PriorityModelPolicy_var model_policy_ptr =
00469 RTCORBA::PriorityModelPolicy::_narrow (model_policy);
00470
00471 TAO_PriorityModelPolicy *priority_model_policy =
00472 static_cast<TAO_PriorityModelPolicy *> (model_policy_ptr.in ());
00473
00474 if (priority_model_policy->get_priority_model () == RTCORBA::CLIENT_PROPAGATED)
00475 {
00476 is_client_propagated = true;
00477 }
00478
00479 if (!is_client_propagated)
00480 {
00481 server_priority = priority_model_policy->server_priority ();
00482 }
00483
00484 return;
00485 }
00486
00487 void
00488 TAO_RT_Protocols_Hooks::get_selector_bands_policy_hook (
00489 CORBA::Policy *bands_policy,
00490 CORBA::Short priority,
00491 CORBA::Short &min_priority,
00492 CORBA::Short &max_priority,
00493 bool &in_range
00494 )
00495 {
00496 RTCORBA::PriorityBandedConnectionPolicy_var bands_policy_ptr =
00497 RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands_policy);
00498
00499 TAO_PriorityBandedConnectionPolicy *priority_bands_policy =
00500 static_cast<TAO_PriorityBandedConnectionPolicy *> (bands_policy_ptr.in ());
00501
00502
00503 RTCORBA::PriorityBands &bands =
00504 priority_bands_policy->priority_bands_rep ();
00505
00506 for (CORBA::ULong i = 0; i < bands.length (); ++i)
00507 {
00508 if (bands[i].low <= priority && bands[i].high >= priority)
00509 {
00510 min_priority = bands[i].low;
00511 max_priority = bands[i].high;
00512
00513 in_range = true;
00514 break;
00515 }
00516 }
00517 }
00518
00519 int
00520 TAO_RT_Protocols_Hooks::get_thread_CORBA_priority (CORBA::Short &priority)
00521 {
00522 priority = TAO_TSS_Resources::instance ()->rtcorba_current_priority_;
00523
00524 return (priority == -1 ? -1 : 0);
00525 }
00526
00527 int
00528 TAO_RT_Protocols_Hooks::get_thread_native_priority (
00529 CORBA::Short &native_priority)
00530 {
00531 ACE_hthread_t current;
00532 ACE_Thread::self (current);
00533
00534 int priority;
00535
00536 if (ACE_Thread::getprio (current, priority) == -1)
00537 {
00538 ACE_DEBUG ((LM_DEBUG,
00539 ACE_TEXT ("TAO (%P|%t) - ")
00540 ACE_TEXT ("RT_Protocols_Hooks::get_thread_native_priority: ")
00541 ACE_TEXT (" ACE_Thread::get_prio failed\n")));
00542
00543 return -1;
00544 }
00545
00546 native_priority = CORBA::Short (priority);
00547 return 0;
00548 }
00549
00550 int
00551 TAO_RT_Protocols_Hooks::get_thread_CORBA_and_native_priority (
00552 CORBA::Short &priority,
00553 CORBA::Short &native_priority)
00554 {
00555 if (this->get_thread_native_priority (native_priority) == -1)
00556 {
00557 return -1;
00558 }
00559
00560 if (this->get_thread_CORBA_priority (priority) == -1)
00561 {
00562
00563
00564
00565 priority = -1;
00566 }
00567
00568 return 0;
00569 }
00570
00571 int
00572 TAO_RT_Protocols_Hooks::get_thread_implicit_CORBA_priority (CORBA::Short &priority)
00573 {
00574 TAO_Priority_Mapping *pm =
00575 this->mapping_manager_.in ()->mapping ();
00576
00577 CORBA::Short native_priority = 0;
00578 if (this->get_thread_native_priority (native_priority) == 0 &&
00579 pm->to_CORBA (native_priority, priority))
00580 {
00581 return 0;
00582 }
00583
00584 return -1;
00585 }
00586
00587 int
00588 TAO_RT_Protocols_Hooks::restore_thread_CORBA_and_native_priority (
00589 CORBA::Short priority,
00590 CORBA::Short native_priority
00591 )
00592 {
00593
00594
00595 int result = this->set_thread_native_priority (native_priority);
00596
00597 if (result == 0)
00598 TAO_TSS_Resources::instance ()->rtcorba_current_priority_ = priority;
00599
00600 return result;
00601 }
00602
00603 int
00604 TAO_RT_Protocols_Hooks::set_thread_CORBA_priority (CORBA::Short priority)
00605 {
00606 TAO_Priority_Mapping *priority_mapping =
00607 this->mapping_manager_.in ()->mapping ();
00608
00609 CORBA::Short native_priority;
00610
00611 if (priority_mapping->to_native (priority, native_priority) == 0)
00612 {
00613 return -1;
00614 }
00615
00616 return this->restore_thread_CORBA_and_native_priority (priority,
00617 native_priority);
00618 }
00619
00620 int
00621 TAO_RT_Protocols_Hooks::set_thread_native_priority (
00622 CORBA::Short native_priority)
00623 {
00624 ACE_hthread_t current;
00625 ACE_Thread::self (current);
00626
00627 if (ACE_Thread::setprio (current, native_priority) == -1)
00628 {
00629 ACE_ERROR_RETURN ((LM_ERROR,
00630 ACE_TEXT ("(%N,%l) Error setting thread ")
00631 ACE_TEXT ("priority to %d, errno %d %m\n"),
00632 native_priority,
00633 ACE_ERRNO_GET),
00634 -1);
00635 }
00636
00637 return 0;
00638 }
00639
00640
00641 ACE_STATIC_SVC_DEFINE (TAO_RT_Protocols_Hooks,
00642 ACE_TEXT ("RT_Protocols_Hooks"),
00643 ACE_SVC_OBJ_T,
00644 &ACE_SVC_NAME (TAO_RT_Protocols_Hooks),
00645 ACE_Service_Type::DELETE_THIS
00646 | ACE_Service_Type::DELETE_OBJ,
00647 0)
00648 ACE_FACTORY_DEFINE (TAO_RTCORBA, TAO_RT_Protocols_Hooks)
00649
00650 TAO_END_VERSIONED_NAMESPACE_DECL
00651
00652 #endif