[Bug 2069] [CBS Scheduler] Memory leak and enqueue problem

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Jun 18 16:11:14 UTC 2012


--- Comment #7 from Gedare <gedare at rtems.org> 2012-06-18 11:11:14 CDT ---
For "Correctly initialize EDF and CBS per-threas structure" we should instead
provide an alternate function/file specific to the CBS scheduler, since they do
differ.  This should be simple enough: copy the attached patch's code into a
new file schedulercbsallocate.c and name the function _Scheduler_CBS_Allocate,
add the new file to score's Makefile.am, and update
include/rtems/score/schedulercbs.h to prototype and use (in the ENTRIES macro)
_Scheduler_CBS_Allocate instead of _Scheduler_EDF_Allocate.

For "Priority fix - dirty hack !!" the problem is that the
SCHEDULER_EDF_PRIO_MSB bit is applied to background tasks, and gets propagated
into the_thread->current_priority and used by threadq code. This hack is "fine"
since it will only look at the lower 16 bits which is exactly the supported
number of priorities in the standard priority scheduling (256 priority levels).
A better solution might be to add another scheduler callout to obtain a
thread's priority, and then callout from threadq_enqueue. I think I see other
areas in score that would have a similar problem, e.g. mutexes, that would
benefit from either applying this hack there as well, or from using a new
scheduler callout.

In the future please submit separate bug reports for separate problems.

Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the bugs mailing list