- Put Simulation in stopped state before changing policy (doesn't

prevent a sigsegv if you try to change it while the simulation
is running)
- Use a red color to indicate a blocked thread / unallocable request
in widgets
- TODO: try the deadlock test w/ the rr (NOT the rr_priority) cpu
policy. There's something wrong with the policy...


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1019 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-06 08:46:06 +00:00
parent a4d6bf2771
commit d9d88e7032
3 changed files with 12 additions and 9 deletions

View file

@ -209,10 +209,12 @@ ConcreteSimulation::get_history() const
void
ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException)
{
stop();
// NOTE: restoring of the previous policy is done here because I
// couldn't think of a clean way to do it
// inside activate_policy()
try
{
CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, p);
@ -253,6 +255,7 @@ ConcreteSimulation::get_policy()
void
ConcreteSimulation::set_resource_policy(ResourcePolicy* p)
{
stop();
ResourcePoliciesGatekeeper::get_instance().activate_policy(&_history, p);
_resource_policy = p;
}