[PATCH 02/17] score: Add _Scheduler_Highest_priority_of_two()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Mar 25 12:49:06 UTC 2014


---
 cpukit/score/include/rtems/score/schedulerimpl.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index 7fbaf54..1cc478b 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -282,6 +282,14 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Generic_block(
 #define _Scheduler_Is_priority_higher_than( _p1, _p2 ) \
   (_Scheduler_Priority_compare(_p1,_p2) > 0)
 
+RTEMS_INLINE_ROUTINE Priority_Control _Scheduler_Highest_priority_of_two(
+  Priority_Control p1,
+  Priority_Control p2
+)
+{
+  return _Scheduler_Is_priority_higher_than( p1, p2 ) ? p1 : p2;
+}
+
 /** @} */
 
 #ifdef __cplusplus
-- 
1.7.7




More information about the devel mailing list