- Substitute the old SchedulableQueue with the new ReadyQueue

- Add interfaces for Process and Thread into the "sgpem.i" SWIG
interface file, change DynamicSchedulable into Schedulable
- Add dynamic_cast for the return value of ReadyQueue::get_item_at()
into the pyloader "sgpem.i" SWIG interface, so that a Schedulable
can be either recognized as a Thread or a Process
- TODO: wrap STL exceptions in SWIG interface
- Please note that code won't compile until the new History and
Scheduler::step_forward() will be in place. This is a known issue.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@689 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-07-02 13:51:03 +00:00
parent fa06e2f4f1
commit 759b90b017
24 changed files with 170 additions and 414 deletions

View file

@ -34,7 +34,7 @@ namespace sgpem
#include "observed_subject.hh"
#include "history.hh"
#include "schedulable_queue.hh"
#include "ready_queue.hh"
#include "user_interrupt_exception.hh"
// Do not include full template definition here
@ -65,13 +65,13 @@ namespace sgpem
\return a pointer to the queue containing all the ready
schedulable objects (for the policy to sort it).
*/
SchedulableQueue* get_ready_queue();
ReadyQueue* get_ready_queue();
/**
Resets the simulation to the initial state.
*/
void reset_status();
/**
Generates a new SchedulableQueue 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
one instant with it.
*/
@ -91,7 +91,7 @@ namespace sgpem
private:
Scheduler(); //private constructor.
SchedulableQueue _ready_queue;
ReadyQueue _ready_queue;
PolicyManager& _policy_manager;
};