diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-14 05:31:07 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-14 05:31:07 +0000 |
commit | 78a4b9ed4b3f9d5533e058722b6ae51c7aa51f1e (patch) | |
tree | 7edd744393baa971ad33c2b642d1a0249cd8848c /TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp | |
parent | af62d68095ddb3b0334a8a6d7ef55f1709808028 (diff) | |
download | ATCD-78a4b9ed4b3f9d5533e058722b6ae51c7aa51f1e.tar.gz |
This commit was manufactured by cvs2svn to create tag 'ACE-4_5_53'.ACE-4_5_53
Diffstat (limited to 'TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp')
-rw-r--r-- | TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp b/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp deleted file mode 100644 index f4179e5af5c..00000000000 --- a/TAO/orbsvcs/Dump_Schedule/Dump_Schedule.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// $Id$ - -#include "ace/Sched_Params.h" -#include "ace/Get_Opt.h" -#include "tao/corba.h" - -#include "orbsvcs/CosNamingC.h" -#include "orbsvcs/Scheduler_Factory.h" - -ACE_RCSID(Dump_Schedule, Dump_Schedule, "$Id$") - -// This program dumps the results of one scheduling in a C++ file. - -int -main (int argc, char *argv[]) -{ - TAO_TRY - { - // Initialize ORB. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - if (CORBA::is_nil(poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::Object_var naming_obj = - orb->resolve_initial_references ("NameService"); - if (CORBA::is_nil(naming_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - CosNaming::NamingContext_var naming_context = - CosNaming::NamingContext::_narrow (naming_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - const char *name = 0; - if (argc > 1) - { - name = argv[1]; - } - ACE_Scheduler_Factory::use_config (naming_context.in (), name); - - RtecScheduler::RT_Info_Set_var infos; - RtecScheduler::Config_Info_Set_var configs; - -#if defined (__SUNPRO_CC) - // Sun C++ 4.2 warns with the code below: - // Warning (Anachronism): Temporary used for non-const - // reference, now obsolete. - // Note: Type "CC -migration" for more on anachronisms. - // Warning (Anachronism): The copy constructor for argument - // infos of type RtecScheduler::RT_Info_Set_out should take - // const RtecScheduler::RT_Info_Set_out&. - // But, this code is not CORBA conformant, because users should - // not define instances of _out types. - - RtecScheduler::RT_Info_Set_out infos_out (infos); - RtecScheduler::Config_Info_Set_out configs_out (configs); - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos_out, configs_out, TAO_TRY_ENV); -#else /* ! __SUNPRO_CC */ - ACE_Scheduler_Factory::server ()->compute_scheduling - (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - ACE_Sched_Params::priority_max (ACE_SCHED_FIFO, - ACE_SCOPE_THREAD), - infos.out (), configs.out (), TAO_TRY_ENV); -#endif /* ! __SUNPRO_CC */ - - TAO_CHECK_ENV; - - ACE_Scheduler_Factory::dump_schedule (infos.in (), - configs.in (), - "Scheduler_Runtime.cpp"); - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("SYS_EX"); - } - TAO_ENDTRY; - - return 0; -} |