diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-11-29 15:52:02 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-11-29 15:52:02 +0000 |
commit | 49c98734fe736bc83d4be0681cc7231307891dba (patch) | |
tree | 085ff769176c170b8d86f436e0b9bf4dd116e792 /TAO/tao/ORB_Core.cpp | |
parent | e4c221321ec7715258af5139b0619e13d9d9b06f (diff) | |
download | ATCD-49c98734fe736bc83d4be0681cc7231307891dba.tar.gz |
Tue Nov 29 15:50:06 UTC 2011 Martin Corino <mcorino@remedy.nl>
* ace/Timer_Queue_T.h:
* ace/Timer_Queue_T.inl:
Added get_timer_method() to be able reuse timer method
setting.
* ace/Countdown_Time.h:
* ace/Countdown_Time.inl:
* ace/Countdown_Time.cpp:
Added option to use application defined timer like
timer queue.
* tao/ORB_Core.cpp:
* tao/params.h:
* tao/params.inl:
* tao/params.cpp:
Added -ORBUseHighresTimer ORB parameter switch to specifiy
if the ORB should use the HR timer for the reactor timer queue
and related objects (like countdowns).
* tao/Transport.cpp:
* tao/Leader_Follower.cpp:
* tao/Messaging/Messaging_Queueing_Strategies.h:
* tao/Messaging/Messaging_Queueing_Strategies.cpp:
Changes to support the new UseHighresTimer switch.
Diffstat (limited to 'TAO/tao/ORB_Core.cpp')
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 774271bdfa5..dd06f2aa5a0 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -50,6 +50,8 @@ #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ #include "ace/Reactor.h" +#include "ace/Timer_Queue.h" +#include "ace/High_Res_Timer.h" #include "ace/Dynamic_Service.h" #include "ace/Arg_Shifter.h" #include "ace/Argv_Type_Converter.h" @@ -780,6 +782,16 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) arg_shifter.consume_arg (); } else if (0 != (current_arg = arg_shifter.get_the_parameter + (ACE_TEXT("-ORBUseHighresTimer")))) + { + // Use Highres Timer or not (default). + int const use_highres_timer = + ACE_OS::atoi (current_arg); + this->orb_params ()->use_highres_timer (use_highres_timer != 0); + + arg_shifter.consume_arg (); + } + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBAMICollocation")))) { int const ami_collocation = ACE_OS::atoi (current_arg); @@ -1252,6 +1264,16 @@ TAO_ORB_Core::init (int &argc, char *argv[] ) CORBA::COMPLETED_NO); } + // handle the ORB timer setting + if (this->orb_params ()->use_highres_timer ()) + { + // intialize GSF now + (void) ACE_High_Res_Timer::global_scale_factor (); + // install highres timer for reactor timer queue + reactor->timer_queue ()->gettimeofday + (&ACE_High_Res_Timer::gettimeofday_hr); + } + TAO_Server_Strategy_Factory *ssf = this->server_factory (); if (ssf == 0) |