- Request queues are now correctly managed by the ConcreteEnvironment
copy constructor and by the add_resource and remove_resource methods found in ConcreteHistory. - Scheduler now adds the requests in the queue when appropriate, and removes them when exhausted. - Still to implement the management of the state of requests depending on their position in the queue - Still to implement the way threads block depending on the state of their requests - step_forward now reuses some bunch of code taken from the prototype git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@824 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
132db18b8c
commit
efe7dedd61
5 changed files with 360 additions and 105 deletions
|
@ -128,7 +128,19 @@ namespace sgpem
|
|||
|
||||
SubRequestQueue&
|
||||
get_request_queue(resource_key_t resource_key);
|
||||
|
||||
|
||||
|
||||
|
||||
typedef std::map<resource_key_t, SubRequestQueue> SubRequestQueues;
|
||||
|
||||
|
||||
/// \brief Returns the set of request queues.
|
||||
/// Returns a reference to the map from resources to subreuqest queues.
|
||||
/// It is needed by history to delete the queue associated to a deleted
|
||||
/// resource.
|
||||
|
||||
SubRequestQueues&
|
||||
get_subrequest_queues();
|
||||
|
||||
/// \brief Returns a snapshot of the current scheduler's ready queue.
|
||||
/// Returns a ReadyQueue object representing the queue
|
||||
|
@ -158,7 +170,6 @@ namespace sgpem
|
|||
|
||||
|
||||
private:
|
||||
typedef std::map<resource_key_t, SubRequestQueue> SubRequestQueues;
|
||||
|
||||
/// \brief The container of all Resource objecs.
|
||||
/// Actually contains only DynamicResource objects.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue