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

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Jul 6 05:38:47 UTC 2012


https://www.rtems.org/bugzilla/show_bug.cgi?id=2069

--- Comment #12 from Andreas Heinig <andreas.heinig at cs.tu-dortmund.de> 2012-07-06 00:38:47 CDT ---
(In reply to comment #11)
> "Extra file for CBS thread context allocation" looks ok to apply to me.
> 
> I still prefer to sit on the "Priority fix - dirty hack !!" patch. The problem
> is that it affects code unrelated to CBS or EDF scheduling. I think we should
> either introduce a scheduler call-out to obtain a thread's priority or find a
> different way to encode the background / periodic task bit.

Another version of the patch could be to explicitly mask out the bit. This is
done e.g. in cpukit/score/src/scheduleredfreleasejob.c:

new_priority = (_Watchdog_Ticks_since_boot + deadline)
                   & ~SCHEDULER_EDF_PRIO_MSB;

This would change my patch in:
-  priority     = the_thread->current_priority;
+  priority     = the_thread->current_priority & ~SCHEDULER_EDF_PRIO_MSB;

Advantage:
o now, everybody knows why there is some bit operation

Disadvantage:
o If another scheduler needs an extra bit too, it would require editing again

-- 
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