#include <RT_ORB.h>
Inheritance diagram for TAO_RT_ORB:
Public Member Functions | |
TAO_RT_ORB (TAO_ORB_Core *orb_core, ACE_Time_Value const &dynamic_thread_idle_timeout) | |
Constructor. | |
virtual RTCORBA::Mutex_ptr | create_mutex (void) |
virtual void | destroy_mutex (RTCORBA::Mutex_ptr the_mutex) |
virtual RTCORBA::Mutex_ptr | create_named_mutex (const char *name, CORBA::Boolean_out created_flag) |
virtual RTCORBA::Mutex_ptr | open_named_mutex (const char *name) |
Retrieve a previously created mutex. | |
RTCORBA::TCPProtocolProperties_ptr | create_tcp_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Boolean enable_network_priority) |
RTCORBA::UnixDomainProtocolProperties_ptr | create_unix_domain_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size) |
RTCORBA::SharedMemoryProtocolProperties_ptr | create_shared_memory_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Long preallocate_buffer_size, const char *mmap_filename, const char *mmap_lockname) |
RTCORBA::UserDatagramProtocolProperties_ptr | create_user_datagram_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean enable_network_priority) |
RTCORBA::StreamControlProtocolProperties_ptr | create_stream_control_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Boolean enable_network_priority) |
virtual RTCORBA::ThreadpoolId | create_threadpool (CORBA::ULong stacksize, CORBA::ULong static_threads, CORBA::ULong dynamic_threads, RTCORBA::Priority default_priority, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, CORBA::ULong max_request_buffer_size) |
Create a RTCORBA threadpool to manage a set of threads without lanes. | |
virtual RTCORBA::ThreadpoolId | create_threadpool_with_lanes (CORBA::ULong stacksize, const RTCORBA::ThreadpoolLanes &lanes, CORBA::Boolean allow_borrowing, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, CORBA::ULong max_request_buffer_size) |
virtual void | destroy_threadpool (RTCORBA::ThreadpoolId threadpool) |
Free the resources associated with the specified threadpool. | |
virtual RTCORBA::PriorityModelPolicy_ptr | create_priority_model_policy (RTCORBA::PriorityModel priority_model, RTCORBA::Priority server_priority) |
Create a priority model policy for use when configuring a POA. | |
virtual RTCORBA::ThreadpoolPolicy_ptr | create_threadpool_policy (RTCORBA::ThreadpoolId threadpool) |
Create a ThreadpoolPolicy instance for POA creation. | |
virtual RTCORBA::PriorityBandedConnectionPolicy_ptr | create_priority_banded_connection_policy (const RTCORBA::PriorityBands &priority_bands) |
virtual RTCORBA::PrivateConnectionPolicy_ptr | create_private_connection_policy (void) |
virtual RTCORBA::ServerProtocolPolicy_ptr | create_server_protocol_policy (const RTCORBA::ProtocolList &protocols) |
virtual RTCORBA::ClientProtocolPolicy_ptr | create_client_protocol_policy (const RTCORBA::ProtocolList &protocols) |
TAO_ORB_Core * | orb_core (void) const |
Reference to our creating ORB Core. | |
TAO_Thread_Pool_Manager & | tp_manager (void) const |
Get the Thread Pool Manager. | |
Static Public Member Functions | |
int | modify_thread_scheduling_policy (CORBA::ORB_ptr orb) |
Protected Member Functions | |
virtual | ~TAO_RT_ORB (void) |
Protected Attributes | |
TAO_ORB_Core *const | orb_core_ |
Reference to our creating ORB Core. | |
TAO_Named_RT_Mutex_Manager | mutex_mgr_ |
mutex_mgr_ manages the names associated with named mutexes. | |
TAO_Thread_Pool_Manager * | tp_manager_ |
Thread Pool Manager. | |
ACE_Time_Value const | dynamic_thread_idle_timeout_ |
Dynamic thread idle timeout. |
Creates and destroys RT CORBA objects, i.e., policies, threadpools, mutexes.
Definition at line 93 of file RT_ORB.h.
|
Constructor.
Definition at line 23 of file RT_ORB.cpp. References TAO_ORB_Core::thread_lane_resources_manager(), TAO_RT_Thread_Lane_Resources_Manager::tp_manager(), and tp_manager_.
00025 : orb_core_ (orb_core), 00026 mutex_mgr_ (), 00027 tp_manager_ (0), 00028 dynamic_thread_idle_timeout_ (dynamic_thread_idle_timeout) 00029 { 00030 TAO_Thread_Lane_Resources_Manager *thread_lane_resources_manager = 00031 &this->orb_core_->thread_lane_resources_manager (); 00032 00033 TAO_RT_Thread_Lane_Resources_Manager *rt_thread_lane_resources_manager = 00034 dynamic_cast <TAO_RT_Thread_Lane_Resources_Manager *> (thread_lane_resources_manager); 00035 00036 if (!rt_thread_lane_resources_manager) 00037 throw CORBA::INTERNAL (); 00038 00039 this->tp_manager_ = 00040 &rt_thread_lane_resources_manager->tp_manager (); 00041 } |
|
Protected destructor to enforce proper memory management of this reference counted object. Definition at line 43 of file RT_ORB.cpp.
00044 { 00045 } |
|
Create a ClientProtocolPolicy instance to select and configure communication protocols on the client side. Definition at line 429 of file RT_ORB.cpp. References ACE_NEW_THROW_EX, and RTCORBA::ProtocolList.
00431 { 00432 TAO_ClientProtocolPolicy *tmp = 0; 00433 ACE_NEW_THROW_EX (tmp, 00434 TAO_ClientProtocolPolicy (protocols), 00435 CORBA::NO_MEMORY (TAO::VMCID, 00436 CORBA::COMPLETED_NO)); 00437 00438 return tmp; 00439 } |
|
Create a new mutex. Mutexes returned by this method are the same as those used internally by the ORB, so that consistant priority inheritance/piority ceiling semantics can be guaranteed. Implements RTCORBA::RTORB. Definition at line 48 of file RT_ORB.cpp. References TAO_Named_RT_Mutex_Manager::create_mutex(), and mutex_mgr_.
00049 { 00050 return this->mutex_mgr_.create_mutex (); 00051 } |
|
Create a mutex and assign a name to it. If the mutex already exists, it is returned and the created_flag is set to 0. Definition at line 61 of file RT_ORB.cpp. References TAO_Named_RT_Mutex_Manager::create_named_mutex(), and mutex_mgr_.
00063 { 00064 return this->mutex_mgr_.create_named_mutex (name, created_flag); 00065 } |
|
Create a PriorityBandedConnectionPolicy instance for use on either the client or server side Definition at line 390 of file RT_ORB.cpp. References ACE_NEW_THROW_EX, and RTCORBA::PriorityBands.
00393 { 00394 TAO_PriorityBandedConnectionPolicy *tmp = 0; 00395 ACE_NEW_THROW_EX (tmp, 00396 TAO_PriorityBandedConnectionPolicy (priority_bands), 00397 CORBA::NO_MEMORY (TAO::VMCID, 00398 CORBA::COMPLETED_NO)); 00399 00400 return tmp; 00401 } |
|
Create a priority model policy for use when configuring a POA.
Definition at line 364 of file RT_ORB.cpp. References ACE_NEW_THROW_EX, and RTCORBA::Priority.
00367 { 00368 TAO_PriorityModelPolicy *tmp = 0; 00369 ACE_NEW_THROW_EX (tmp, 00370 TAO_PriorityModelPolicy (priority_model, server_priority), 00371 CORBA::NO_MEMORY (TAO::VMCID, 00372 CORBA::COMPLETED_NO)); 00373 00374 return tmp; 00375 } |
|
Create a PrivateConnectionPolicy instance to use on client to request a private (non-multiplexed) transport connection to the server. Implements RTCORBA::RTORB. Definition at line 404 of file RT_ORB.cpp. References ACE_NEW_THROW_EX.
00405 { 00406 TAO_PrivateConnectionPolicy *tmp = 0; 00407 ACE_NEW_THROW_EX (tmp, 00408 TAO_PrivateConnectionPolicy (), 00409 CORBA::NO_MEMORY (TAO::VMCID, 00410 CORBA::COMPLETED_NO)); 00411 00412 return tmp; 00413 } |
|
Create a ServerProtocolPolicy instance to select and configure communication protocols on the server side. Definition at line 416 of file RT_ORB.cpp. References ACE_NEW_THROW_EX, and RTCORBA::ProtocolList.
00418 { 00419 TAO_ServerProtocolPolicy *tmp = 0; 00420 ACE_NEW_THROW_EX (tmp, 00421 TAO_ServerProtocolPolicy (protocols), 00422 CORBA::NO_MEMORY (TAO::VMCID, 00423 CORBA::COMPLETED_NO)); 00424 00425 return tmp; 00426 } |
|
Definition at line 248 of file RT_ORB.cpp. References ACE_NEW_THROW_EX.
00257 { 00258 TAO_SharedMemory_Protocol_Properties *tmp = 0; 00259 ACE_NEW_THROW_EX (tmp, 00260 TAO_SharedMemory_Protocol_Properties (send_buffer_size, 00261 recv_buffer_size, 00262 keep_alive, 00263 dont_route, 00264 no_delay, 00265 preallocate_buffer_size, 00266 mmap_filename, 00267 mmap_lockname), 00268 CORBA::NO_MEMORY (TAO::VMCID, 00269 CORBA::COMPLETED_NO)); 00270 00271 return tmp; 00272 } |
|
Definition at line 293 of file RT_ORB.cpp. References ACE_NEW_THROW_EX.
00301 { 00302 TAO_StreamControl_Protocol_Properties *tmp = 0; 00303 ACE_NEW_THROW_EX (tmp, 00304 TAO_StreamControl_Protocol_Properties ( 00305 send_buffer_size, 00306 recv_buffer_size, 00307 keep_alive, 00308 dont_route, 00309 no_delay, 00310 enable_network_priority), 00311 CORBA::NO_MEMORY (TAO::VMCID, 00312 CORBA::COMPLETED_NO)); 00313 00314 return tmp; 00315 } |
|
Create and return a TCPProtocolProperties instance with the specified parameters. Definition at line 208 of file RT_ORB.cpp. References ACE_NEW_THROW_EX.
00215 { 00216 TAO_TCP_Protocol_Properties *tmp = 0; 00217 ACE_NEW_THROW_EX (tmp, 00218 TAO_TCP_Protocol_Properties (send_buffer_size, 00219 recv_buffer_size, 00220 keep_alive, 00221 dont_route, 00222 no_delay, 00223 enable_network_priority), 00224 CORBA::NO_MEMORY (TAO::VMCID, 00225 CORBA::COMPLETED_NO)); 00226 00227 return tmp; 00228 } |
|
Create a RTCORBA threadpool to manage a set of threads without lanes.
Definition at line 318 of file RT_ORB.cpp. References TAO_Thread_Pool_Manager::create_threadpool(), RTCORBA::Priority, and tp_manager_.
00326 { 00327 return this->tp_manager_->create_threadpool (stacksize, 00328 static_threads, 00329 dynamic_threads, 00330 default_priority, 00331 allow_request_buffering, 00332 max_buffered_requests, 00333 max_request_buffer_size, 00334 this->dynamic_thread_idle_timeout_ 00335 ); 00336 } |
|
Create a ThreadpoolPolicy instance for POA creation.
Definition at line 378 of file RT_ORB.cpp. References ACE_NEW_THROW_EX, and RTCORBA::ThreadpoolId.
00379 { 00380 TAO_ThreadpoolPolicy *tmp = 0; 00381 ACE_NEW_THROW_EX (tmp, 00382 TAO_ThreadpoolPolicy (threadpool), 00383 CORBA::NO_MEMORY (TAO::VMCID, 00384 CORBA::COMPLETED_NO)); 00385 00386 return tmp; 00387 } |
|
Create a threadpool and separate it into subsets based on priorities. Definition at line 339 of file RT_ORB.cpp. References TAO_Thread_Pool_Manager::create_threadpool_with_lanes(), RTCORBA::ThreadpoolLanes, and tp_manager_.
00346 { 00347 return this->tp_manager_->create_threadpool_with_lanes (stacksize, 00348 lanes, 00349 allow_borrowing, 00350 allow_request_buffering, 00351 max_buffered_requests, 00352 max_request_buffer_size, 00353 this->dynamic_thread_idle_timeout_ 00354 ); 00355 } |
|
Definition at line 231 of file RT_ORB.cpp. References ACE_NEW_THROW_EX.
00235 { 00236 TAO_UnixDomain_Protocol_Properties *tmp = 0; 00237 ACE_NEW_THROW_EX (tmp, 00238 TAO_UnixDomain_Protocol_Properties ( 00239 send_buffer_size, 00240 recv_buffer_size), 00241 CORBA::NO_MEMORY (TAO::VMCID, 00242 CORBA::COMPLETED_NO)); 00243 00244 return tmp; 00245 } |
|
Definition at line 275 of file RT_ORB.cpp. References ACE_NEW_THROW_EX.
00279 { 00280 TAO_UserDatagram_Protocol_Properties *tmp = 0; 00281 ACE_NEW_THROW_EX (tmp, 00282 TAO_UserDatagram_Protocol_Properties ( 00283 send_buffer_size, 00284 recv_buffer_size, 00285 enable_network_priority), 00286 CORBA::NO_MEMORY (TAO::VMCID, 00287 CORBA::COMPLETED_NO)); 00288 00289 return tmp; 00290 } |
|
Destroy a mutex. Currently this is a no-op since RTCORBA::Mutex instances are destroyed as soon as their reference counts go to 0. Definition at line 54 of file RT_ORB.cpp. References TAO_Named_RT_Mutex_Manager::destroy_mutex(), and mutex_mgr_.
00055 { 00056 this->mutex_mgr_.destroy_mutex (mutex); 00057 } |
|
Free the resources associated with the specified threadpool.
Definition at line 358 of file RT_ORB.cpp. References TAO_Thread_Pool_Manager::destroy_threadpool(), RTCORBA::ThreadpoolId, and tp_manager_.
00359 { 00360 this->tp_manager_->destroy_threadpool (threadpool); 00361 } |
|
This method changes the scheduling policy of the calling thread to match the scheduling policy specified in the svc.conf file. The priority of the calling thread will be set to the minimum priority supported by that scheduling policy. This method make sense on those platform (e.g., Linux) where PTHREAD_SCOPE_SYSTEM is the only scheduling scope supported. On other platforms, this method is a no-op since the only way to get the real-time threading behavior is to setup the PTHREAD_SCOPE_SYSTEM scheduling scope when a thread is being created. On such platforms, one can set the correct scheduling scope and policy when creating the thread, thus not needing to use this method. Definition at line 455 of file RT_ORB.cpp. References ACE_hthread_t, ACE_NOTSUP_RETURN, ACE_Sched_Params::priority_min(), ACE_Thread::self(), and ACE_Thread::setprio().
00456 { 00457 // 00458 // This method changes the scheduling policy of the calling thread 00459 // to match the scheduling policy specified in the svc.conf file. 00460 // The priority of the calling thread will be set to the minimum 00461 // priority supported by that scheduling policy. 00462 // 00463 // This method make sense on those platform (e.g., Linux) where 00464 // PTHREAD_SCOPE_SYSTEM is the only scheduling scope supported. On 00465 // other platforms, this method is a no-op since the only way to get 00466 // the real-time threading behavior is to setup the 00467 // PTHREAD_SCOPE_SYSTEM scheduling scope when a thread is being 00468 // created. On such platforms, one can set the correct scheduling 00469 // scope and policy when creating the thread, thus not needing to 00470 // use this method. 00471 // 00472 00473 #if defined (linux) 00474 00475 int const sched_policy = orb->orb_core ()->orb_params ()->ace_sched_policy (); 00476 00477 int const minimum_priority = ACE_Sched_Params::priority_min (sched_policy); 00478 00479 ACE_hthread_t thread_id; 00480 ACE_Thread::self (thread_id); 00481 00482 return ACE_Thread::setprio (thread_id, minimum_priority, sched_policy); 00483 00484 #else /* linux */ 00485 00486 ACE_UNUSED_ARG (orb); 00487 ACE_NOTSUP_RETURN (-1); 00488 00489 #endif /* linux */ 00490 00491 } |
|
Retrieve a previously created mutex.
Definition at line 68 of file RT_ORB.cpp. References mutex_mgr_, and TAO_Named_RT_Mutex_Manager::open_named_mutex().
00069 { 00070 return this->mutex_mgr_.open_named_mutex (name); 00071 } |
|
Reference to our creating ORB Core.
Reimplemented from CORBA::Object. Definition at line 448 of file RT_ORB.cpp.
00449 { 00450 return this->orb_core_; 00451 } |
|
Get the Thread Pool Manager.
Definition at line 442 of file RT_ORB.cpp. References tp_manager_.
00443 { 00444 return *this->tp_manager_; 00445 } |
|
Dynamic thread idle timeout.
|
|
mutex_mgr_ manages the names associated with named mutexes.
Definition at line 266 of file RT_ORB.h. Referenced by create_mutex(), create_named_mutex(), destroy_mutex(), and open_named_mutex(). |
|
Reference to our creating ORB Core.
Reimplemented from CORBA::Object. |
|
Thread Pool Manager.
Definition at line 269 of file RT_ORB.h. Referenced by create_threadpool(), create_threadpool_with_lanes(), destroy_threadpool(), TAO_RT_ORB(), and tp_manager(). |