[Bug 1895] Pluggable scheduler priority_compare and release_job hooks

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Aug 18 18:55:46 UTC 2011


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

--- Comment #7 from Gedare <giddyup44 at yahoo.com> 2011-08-18 13:55:45 CDT ---
I was wondering if the return of priority_compare can be just <0, =0, or >0?
Such behavior is like what strcmp provides. Then I think
_Scheduler_priority_Priority_compare_body can be implemented as simply (return
p2-p1)? The macros for _Is_priority_higher/lower_than would need to be changed
to do inequality checks instead of checking for equality to -1/1.  I don't know
that such a micro-optimization matters much to performance, but the definition
of being <0,=0,>0 aligns with other functions in C standard lib.

Otherwise I'm OK with this.

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