- Added the Schedulable interface
- Renamed SchedulableStatus to DynamicSchedulable - Implemented almost all methods of DynamicSchedulable git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@630 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
94c0b563c7
commit
a1662de194
22 changed files with 492 additions and 239 deletions
|
@ -390,7 +390,7 @@ TextSimulation::update()
|
|||
_devices[dev]->write_buffer(temp + ") [RUNS]");
|
||||
|
||||
//insert the RUNNING ONE
|
||||
smart_ptr<SchedulableStatus> running = h.get_scheduled_at(when);
|
||||
smart_ptr<DynamicSchedulable> running = h.get_scheduled_at(when);
|
||||
if (running)
|
||||
{
|
||||
arr = running->get_schedulable()->get_arrival_time();
|
||||
|
@ -401,7 +401,7 @@ TextSimulation::update()
|
|||
_devices[dev]->write_buffer(" --[READY]");
|
||||
//insert the READY ones
|
||||
for (uint i = 0; i < ll->size(); i++)
|
||||
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_ready)
|
||||
if (ll->get_item_at(i)->get_state() == DynamicSchedulable::state_ready)
|
||||
{
|
||||
arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
|
||||
int_to_string(arr, temp);
|
||||
|
@ -411,7 +411,7 @@ TextSimulation::update()
|
|||
_devices[dev]->write_buffer(" --[BLOCKED]");
|
||||
//insert the BLOCKED ones
|
||||
for (uint i = 0; i < ll->size(); i++)
|
||||
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_blocked)
|
||||
if (ll->get_item_at(i)->get_state() == DynamicSchedulable::state_blocked)
|
||||
{
|
||||
arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
|
||||
int_to_string(arr, temp);
|
||||
|
@ -421,7 +421,7 @@ TextSimulation::update()
|
|||
_devices[dev]->write_buffer(" --[FUTURE]");
|
||||
//insert the FUTURE ones
|
||||
for (uint i = 0; i < ll->size(); i++)
|
||||
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_future)
|
||||
if (ll->get_item_at(i)->get_state() == DynamicSchedulable::state_future)
|
||||
{
|
||||
arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
|
||||
int_to_string(arr, temp);
|
||||
|
@ -431,7 +431,7 @@ TextSimulation::update()
|
|||
_devices[dev]->write_buffer(" --[TERM]");
|
||||
//insert the TERMINATED ones
|
||||
for (uint i = 0; i < ll->size(); i++)
|
||||
if (ll->get_item_at(i)->get_state() == SchedulableStatus::state_terminated)
|
||||
if (ll->get_item_at(i)->get_state() == DynamicSchedulable::state_terminated)
|
||||
{
|
||||
arr = ll->get_item_at(i)->get_schedulable()->get_arrival_time();
|
||||
int_to_string(arr, temp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue