- Reconstructed step forward. There is still some visible bug in the

imlpementation, so this version should not be considered definitive.
please give me an other day to check it.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@840 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
matrevis 2006-08-10 23:39:13 +00:00
parent 17ca8156d9
commit 6a1e30b0a2
2 changed files with 662 additions and 679 deletions

File diff suppressed because it is too large Load Diff

View File

@ -28,11 +28,10 @@ namespace sgpem
#include "config.h" #include "config.h"
#include "history.hh" #include "concrete_history.hh"
#include "cpu_policy.hh" #include "cpu_policy.hh"
#include "ready_queue.hh" #include "ready_queue.hh"
#include "user_interrupt_exception.hh" #include "user_interrupt_exception.hh"
#include "malformed_policy_exception.hh"
// Do not include full template definition here // Do not include full template definition here
#include "singleton.hh" #include "singleton.hh"
@ -68,16 +67,18 @@ namespace sgpem
ReadyQueue* get_ready_queue(); ReadyQueue* get_ready_queue();
/** /**
Resets the simulation to the initial state. Resets the simulation to the initial state.
Deprecated.
*/ */
void reset_status(); // void reset_status();
/** /**
Generates a new ReadyQueue representing the status of the processes Generates a new ReadyQueue representing the status of the processes
at the simulation instant next to the current one, and extends the History by at the simulation instant next to the current one, and extends the History by
one instant with it. one instant with it.
Returning true if next instants will be identical to the last one added.
\return false If the simulation has ended, true otherwise \return false If the simulation has ended, true otherwise
*/ */
bool step_forward(History& history, CPUPolicy& cpu_policy) throw(UserInterruptException, MalformedPolicyException); bool step_forward(ConcreteHistory& history, CPUPolicy& cpu_policy) throw(UserInterruptException);
/** /**
Returns the policy that will be used to generate the simulation at the next instant. Returns the policy that will be used to generate the simulation at the next instant.