- Try to make CPUPolicy.get_parameters() and RR-Priority work. Won't
run. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@833 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
addad6aa26
commit
72e562e803
8 changed files with 38 additions and 52 deletions
|
@ -7,7 +7,8 @@ import sgpem
|
|||
# This class also exposes the method sort(), which can be
|
||||
# used to easily sort the queue of ready process with a
|
||||
# user-defined given compare function.
|
||||
class CPUPolicy:
|
||||
# The method get_parameters() is inherited from sgpem.CPUPolicy.
|
||||
class CPUPolicy(sgpem.CPUPolicy):
|
||||
## @var Avoid instantiation of an abstract class.
|
||||
# @see Abstract.Metaclass
|
||||
__metaclass__ = Metaclass
|
||||
|
@ -91,26 +92,6 @@ class CPUPolicy:
|
|||
# @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 wether this policy sorts processes or threads
|
||||
#
|
||||
# Should be implemented with signature:
|
||||
# @code
|
||||
# def wants(self):
|
||||
# # function body
|
||||
# @endcode
|
||||
#
|
||||
# @return sgpem.policy_sorts_processes If the policy sorts processes
|
||||
# @return sgpem.policy_sorts_threads If the policy sorts threads
|
||||
wants = AbstractMethod('wants')
|
||||
|
||||
## @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 ReadyQueue methods
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue