diff options
Diffstat (limited to 'TAO/orbsvcs/lib/Scheduler_Factory.h')
-rw-r--r-- | TAO/orbsvcs/lib/Scheduler_Factory.h | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/TAO/orbsvcs/lib/Scheduler_Factory.h b/TAO/orbsvcs/lib/Scheduler_Factory.h deleted file mode 100644 index 2529b0be35a..00000000000 --- a/TAO/orbsvcs/lib/Scheduler_Factory.h +++ /dev/null @@ -1,98 +0,0 @@ -// ============================================================================ -// -// $Id$ -// -// ============================================================================ - -#ifndef ACE_SCHEDULER_FACTORY_H -#define ACE_SCHEDULER_FACTORY_H - -#include "ace/OS.h" - -#include "RtecSchedulerC.h" -#include "CosNamingC.h" - -class ACE_Scheduler_Factory - // = TITLE - // Factory of scheduler services. - // - // = DESCRIPTION - // This class acts as a factory for scheduler servers. At config - // time it will return a remote server, which will actually - // compute the scheduling parameters. At run-time it returns a - // local server, which will use the results of the config runs to - // actually do the scheduling, without incurring in RPC overheads. -{ -public: - struct POD_RT_Info - // = TITLE - // Plain Old Data for RT_Infos. - // - // = DESCRIPTION - // This class provide us with a plain old data version of - // RT_Info, this is useful for implementing static arrays or of - // those. - { - const char* entry_point; - RtecScheduler::handle_t handle; - RtecScheduler::Time worst_case_execution_time; - RtecScheduler::Time typical_execution_time; - RtecScheduler::Time cached_execution_time; - RtecScheduler::Period period; - RtecScheduler::Importance importance; - RtecScheduler::Quantum quantum; - CORBA::Long threads; - RtecScheduler::OS_Priority priority; - RtecScheduler::Sub_Priority subpriority; - RtecScheduler::Preemption_Priority preemption_priority; - }; - - static int use_config (CosNaming::NamingContext_ptr naming); - // Setup the variables needed for a config run, using the - // NamingContext to locate a Scheduler. - - static int use_config (CORBA::ORB_ptr orb); - // Setup the variable needed for a config run, using an environment - // variable to locate a Scheduler. - - static int use_runtime (int entry_count, - POD_RT_Info rt_info[]); - // Disable config runs in the Factory and setups the precomputed - // scheduling. - - static RtecScheduler::Scheduler_ptr server (void); - // Return the Real-time Scheduling Service used for this run. - // Must have been configured either using use_context() or use_data(). - // - // Normally use_data() is called at static elaboration time, so - // everything is automatic. - // On config runs use_context() is called from main, after - // resolve_initial_references. - - static int dump_schedule (const RtecScheduler::RT_Info_Set& infos, - const char* file_name = 0); - // This helper function will dump the schedule returned by a - // RtecScheduler::Scheduler into a file, the file can be compiled to - // create an efficient local implementation of the Scheduler. - - // TODO: How to do cleanup()? Use the ACE_Object_Manager stuff? - -protected: - static int no_config_run (void); - // By default this factory assumes we are runnning a config - // run. Calling this method disables that. - // Since the methods returns an int it can be used to initialize a - // static variable, hence calling it before main(); this technique - // can be used in the code emitted for the run-time scheduler, - // automagically disabling the config_run() when that code is linked - // in. - -private: - static RtecScheduler::Scheduler_ptr server_; -}; - -#if defined (__ACE_INLINE__) -#include "Scheduler_Factory.i" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_SCHEDULER_FACTORY_H */ |