sgpemv2/src/backend/pyloader/Policy.py

29 lines
838 B
Python
Raw Normal View History

from Abstract import *
## @brief this function implements a quicksort in place
# using the SchedulableQueue methods
#
# The compare parameter should be a user defined function
# name returning either True or False, defined like:
# @code
# def compare(SchedulableA,SchedulableB):
# return SchedulableA.someProperty() < SchedulableB.someProperty()
# @endcode
#
# @param queue The SchedulableQueue to be sorted in place
# @param cmp The binary function to use to compare elements
# @returns None
def sort(queue, cmp):
pass
class Policy:
## @var Avoid instantiation of an abstract class
__metaclass__ = Metaclass
configure = AbstractMethod('configure')
sort_queue = AbstractMethod('sort_queue')
is_preemptive = AbstractMethod('is_preemptive')
get_time_slice = AbstractMethod('get_time_slice')