diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-09-01 18:13:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-09-01 18:13:54 +0000 |
commit | ac9d2ecc46ea40b6da0ccaeeabd16e8c19ff47e0 (patch) | |
tree | 4f87d546461e9cc7cfd18ccc187073161fb333b7 /cpukit/score/inline/rtems/score/schedulerpriority.inl | |
parent | 2011-09-01 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-ac9d2ecc46ea40b6da0ccaeeabd16e8c19ff47e0.tar.bz2 |
2011-09-01 Petr Benes <benesp16@fel.cvut.cz>
PR 1895/cpukit
* rtems/src/ratemoncancel.c, rtems/src/ratemondelete.c,
rtems/src/ratemonperiod.c, sapi/include/confdefs.h,
score/Makefile.am, score/include/rtems/score/scheduler.h,
score/include/rtems/score/schedulerpriority.h,
score/include/rtems/score/schedulersimple.h,
score/include/rtems/score/schedulersimplesmp.h,
score/inline/rtems/score/scheduler.inl,
score/inline/rtems/score/schedulerpriority.inl,
score/src/coremutexseize.c: Add priority_compare and release_job
hooks interfaces to scheduler interface.
* score/src/schedulerpriorityprioritycompare.c,
score/src/schedulerpriorityreleasejob.c: New files.
Diffstat (limited to 'cpukit/score/inline/rtems/score/schedulerpriority.inl')
-rw-r--r-- | cpukit/score/inline/rtems/score/schedulerpriority.inl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpukit/score/inline/rtems/score/schedulerpriority.inl b/cpukit/score/inline/rtems/score/schedulerpriority.inl index ab5f117334..9b418fc7ae 100644 --- a/cpukit/score/inline/rtems/score/schedulerpriority.inl +++ b/cpukit/score/inline/rtems/score/schedulerpriority.inl @@ -185,6 +185,23 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) ); } +/** + * @brief Scheduler priority Priority compare body + * + * This routine implements priority comparison for priority-based + * scheduling. + * + * @return >0 for higher priority, 0 for equal and <0 for lower priority. + */ +RTEMS_INLINE_ROUTINE int _Scheduler_priority_Priority_compare_body( + Priority_Control p1, + Priority_Control p2 +) +{ + /* High priority in priority scheduler is represented by low numbers. */ + return ( p2 - p1 ); +} + /**@}*/ #endif |