- Fix test to initialize a set of processes and run a simulation
- The test needs to be linked to Gtkmm, even if it doesn't use it. This is wrong and a coding anomaly that will need to be resolved. - Add debug code to fcfs.py. Please remove it when it'll be okay - Calling dir(SchedulableList.get_item_at(x)) from Python shows a worringly empty list! git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@395 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
a2a492b5d5
commit
8d6b7c500e
11 changed files with 236 additions and 33 deletions
|
@ -14,7 +14,20 @@ class fcfs(Policy) :
|
|||
return -1
|
||||
|
||||
def sort_queue(self, event, queue):
|
||||
print 'Entering sort_queue'
|
||||
print queue.size()
|
||||
print dir(queue.get_item_at(0))
|
||||
for i in range(0, queue.size()):
|
||||
ss = queue.get_item_at(i)
|
||||
print ss.get_schedulable().get_name()
|
||||
cmpf = lambda a, b: \
|
||||
a.get_schedulable().get_arrival_time() < \
|
||||
b.get_schedulable().get_arrival_time()
|
||||
self.sort(queue,cmpf)
|
||||
try:
|
||||
self.sort(queue,cmpf)
|
||||
except:
|
||||
print "Unexpected error:", sys.exc_info()[0]
|
||||
raise
|
||||
for i in range(0, queue.size()):
|
||||
ss = queue.get_item_at(i)
|
||||
print ss.get_schedulable().get_name()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue