- Fix Schedulable::get_name() in SWIG export interface
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@431 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
dc84bfd16c
commit
1395347b1a
2 changed files with 17 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
from Abstract import *
|
||||
from Abstract import *
|
||||
import sgpem
|
||||
|
||||
## @brief This is the abstract class a user-defined policy
|
||||
# should inherit from
|
||||
|
@ -95,6 +96,15 @@ class Policy:
|
|||
# @return -1 If the policy doesn't want to use time slices
|
||||
# @return 0+ To specify a time slice duration for this policy
|
||||
get_time_slice = AbstractMethod('get_time_slice')
|
||||
|
||||
|
||||
## @brief Returns the PolicyParameters instance you can use in
|
||||
# Policy::Policy::configure()
|
||||
#
|
||||
# @return A sgpem::PolicyParameters instance
|
||||
def get_parameters(self):
|
||||
return sgpem.Scheduler.get_instance().get_policy().get_parameters()
|
||||
|
||||
|
||||
## @brief This function implements an in-place stable sort
|
||||
# using directly SchedulableQueue methods
|
||||
|
@ -127,6 +137,7 @@ class Policy:
|
|||
def sort(self, queue, cmpf):
|
||||
self.__recursive_qsort(queue, 0, queue.size()-1, cmpf)
|
||||
|
||||
|
||||
## @brief Recursive (private) call to perform quicksort on a
|
||||
# queue
|
||||
#
|
||||
|
@ -139,7 +150,8 @@ class Policy:
|
|||
if(b>a):
|
||||
pivot = self.__partition(queue, a, b, cmpf)
|
||||
self.__recursive_qsort(queue, a, pivot-1, cmpf)
|
||||
self.__recursive_qsort(queue, pivot+1, b, cmpf)
|
||||
self.__recursive_qsort(queue, pivot+1, b, cmpf)
|
||||
|
||||
|
||||
## @brief Recursive (private) call to partition a slice of the queue
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue