- Make libpyloader a loadable plugin (warning: won't work
on Window$ unless you change the string "libpyloader" to "pyloader" into main.cc) - Fix Makefile to support module creation and loading - 2DO: - Add a class into backend to load and manage plugins - Install plugins into separate directory - Remove hardcoded paths git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@458 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
38f7b84909
commit
56534edb6c
15 changed files with 187 additions and 215 deletions
|
@ -22,7 +22,9 @@
|
|||
#define SCHEDULER_HH 1
|
||||
namespace sgpem
|
||||
{
|
||||
class Policy;
|
||||
class Scheduler;
|
||||
class PolicyManager;
|
||||
class Policy;
|
||||
}
|
||||
|
||||
#include "config.h"
|
||||
|
@ -71,9 +73,11 @@ namespace sgpem
|
|||
event_end_time_slice
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the unique instance of this class, conforming to the Singleton pattern.
|
||||
\return the unique instance of this class, conforming to the Singleton pattern.
|
||||
/** \brief Returns the unique instance of this class, conforming to the Singleton pattern.
|
||||
*
|
||||
* If Scheduler isn't initialized, creates it. Should be called at least once before
|
||||
* starting the Simulation.
|
||||
* \return the unique instance of this class, conforming to the Singleton pattern.
|
||||
*/
|
||||
static Scheduler& get_instance();
|
||||
/**
|
||||
|
@ -97,19 +101,21 @@ namespace sgpem
|
|||
Sets the policy that will be used to generate the simulation at the next instant.
|
||||
\param policy the policy that will be used to generate the simulation at the next instant.
|
||||
*/
|
||||
/* DISABLED until we don't have PolicyManager::set_policy()
|
||||
void set_policy(Policy* policy);
|
||||
*/
|
||||
/**
|
||||
Returns the policy that will be used to generate the simulation at the next instant.
|
||||
\return the policy that will be used to generate the simulation at the next instant.
|
||||
*/
|
||||
Policy* get_policy();
|
||||
Policy& get_policy();
|
||||
|
||||
|
||||
private:
|
||||
Scheduler(int); //private constructor. The parameter is discarded
|
||||
static Scheduler _instance;
|
||||
Scheduler(); //private constructor.
|
||||
static Scheduler* _instance;
|
||||
SchedulableList _ready_queue;
|
||||
Policy* _policy;
|
||||
PolicyManager& _policy_manager;
|
||||
};
|
||||
|
||||
}//~ namespace sgpem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue