mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
F #1843: Sent scheduler like parameter
This commit is contained in:
parent
d19910f6e9
commit
31429d8d40
@ -43,14 +43,19 @@ class Scheduler: public ActionListener
|
||||
{
|
||||
public:
|
||||
|
||||
static Scheduler* sched;
|
||||
|
||||
void start();
|
||||
|
||||
virtual void register_policies(const SchedulerTemplate& conf){};
|
||||
|
||||
static Scheduler& instance()
|
||||
static Scheduler& instance(Scheduler* the_sched=0)
|
||||
{
|
||||
static Scheduler _sched;
|
||||
return _sched;
|
||||
if ( the_sched != 0)
|
||||
{
|
||||
sched = the_sched;
|
||||
}
|
||||
return *sched;
|
||||
}
|
||||
|
||||
float get_mem_ds_scale()
|
||||
|
@ -37,6 +37,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
Scheduler* Scheduler::sched = 0;
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
@ -15,6 +15,7 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
#include "RankScheduler.h"
|
||||
#include "Scheduler.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -25,7 +26,7 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Scheduler& sched = RankScheduler::instance();
|
||||
Scheduler& sched = Scheduler::instance(new RankScheduler());
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user