- Rename Policy to CPUPolicy where appropriate
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@811 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
5b577c5979
commit
43b817aaed
31 changed files with 222 additions and 225 deletions
|
@ -19,8 +19,8 @@
|
|||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#include "backend/string_utils.hh"
|
||||
#include "backend/policies_gatekeeper.hh"
|
||||
#include "backend/policy_manager.hh"
|
||||
#include "backend/cpu_policies_gatekeeper.hh"
|
||||
#include "backend/cpu_policy_manager.hh"
|
||||
#include "backend/policy_parameters.hh"
|
||||
#include "backend/history.hh"
|
||||
#include "backend/static_process.hh"
|
||||
|
@ -382,7 +382,7 @@ TextSimulation::on_configure_cpu_policy(const Tokens& arguments)
|
|||
{
|
||||
check_arguments_num(arguments, 0);
|
||||
|
||||
Policy* policy = Simulation::get_instance().get_policy();
|
||||
CPUPolicy* policy = Simulation::get_instance().get_policy();
|
||||
|
||||
if(policy == NULL)
|
||||
{
|
||||
|
@ -620,17 +620,17 @@ TextSimulation::on_set(const Tokens& arguments)
|
|||
if(policy < 0)
|
||||
throw domain_error("");
|
||||
|
||||
typedef vector<PolicyManager*> ManagerVec;
|
||||
typedef vector<Policy*>::iterator PolicyIt;
|
||||
typedef vector<CPUPolicyManager*> ManagerVec;
|
||||
typedef vector<CPUPolicy*>::iterator CPUPolicyIt;
|
||||
|
||||
PoliciesGatekeeper& gatekeeper = PoliciesGatekeeper::get_instance();
|
||||
CPUPoliciesGatekeeper& gatekeeper = CPUPoliciesGatekeeper::get_instance();
|
||||
|
||||
ManagerVec managers = gatekeeper.get_registered();
|
||||
|
||||
for(ManagerVec::iterator it = managers.begin(); it != managers.end(); ++it)
|
||||
{
|
||||
vector<Policy*> policies = (*it)->get_avail_policies();
|
||||
for(PolicyIt it = policies.begin(); it != policies.end(); ++it)
|
||||
vector<CPUPolicy*> policies = (*it)->get_avail_policies();
|
||||
for(CPUPolicyIt it = policies.begin(); it != policies.end(); ++it)
|
||||
{
|
||||
if(policy == 0)
|
||||
Simulation::get_instance().set_policy(*it);
|
||||
|
@ -828,20 +828,20 @@ TextSimulation::on_show_subrequests(const Tokens& arguments)
|
|||
void
|
||||
TextSimulation::on_show_cpu_policies(const Tokens& arguments)
|
||||
{
|
||||
typedef vector<PolicyManager*> ManagerVec;
|
||||
typedef vector<Policy*>::iterator PolicyIt;
|
||||
typedef vector<CPUPolicyManager*> ManagerVec;
|
||||
typedef vector<CPUPolicy*>::iterator CPUPolicyIt;
|
||||
|
||||
check_arguments_num(arguments, 0);
|
||||
|
||||
PoliciesGatekeeper& gatekeeper = PoliciesGatekeeper::get_instance();
|
||||
CPUPoliciesGatekeeper& gatekeeper = CPUPoliciesGatekeeper::get_instance();
|
||||
|
||||
ManagerVec managers = gatekeeper.get_registered();
|
||||
|
||||
unsigned int index = 1;
|
||||
for(ManagerVec::iterator it = managers.begin(); it != managers.end(); ++it)
|
||||
{
|
||||
vector<Policy*> policies = (*it)->get_avail_policies();
|
||||
for(PolicyIt it = policies.begin(); it != policies.end(); ++it)
|
||||
vector<CPUPolicy*> policies = (*it)->get_avail_policies();
|
||||
for(CPUPolicyIt it = policies.begin(); it != policies.end(); ++it)
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << index << ". " << (*it)->get_name() << endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue