- Small fix to let the application work

using ResourcePoliciesGatekeeper


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@968 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
matrevis 2006-08-30 21:09:47 +00:00
parent 685a6d84f0
commit 26755fd876
4 changed files with 27 additions and 3 deletions

View file

@ -36,6 +36,9 @@
#include "backend/cpu_policies_gatekeeper.hh"
#include "backend/cpu_policy.hh"
#include "backend/cpu_policy_manager.hh"
#include "backend/resource_policies_gatekeeper.hh"
#include "backend/resource_policy_manager.hh"
#include "backend/history.hh"
#include "backend/simulation.hh"
@ -273,6 +276,14 @@ GuiBuilder::GuiBuilder(const std::string& gladefile)
CPUPolicy* policy = pgk.get_registered()[0]->get_avail_policies()[1]; // RoundRobin at the moment of writing
std::cout << "Selected policy : " << policy->get_name() << std::endl;
sim.set_policy(policy);
// FIXME: dedicate a function to set resource policy
// which includes the following default one
ResourcePolicyManager & rpm = *ResourcePoliciesGatekeeper::get_instance().get_registered().at(0);
Simulation::get_instance().set_resource_policy(rpm.get_avail_policies().at(0));
// end of include
}