mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
F #1843: Sent scheduler like parameter
(cherry picked from commit 31429d8d40)
This commit is contained in:
1 parent
a9573b8d66
commit
9776a388b0
3 files changed
+12
-4
No files matched your search
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user