summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/prioritybitmapimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-08 08:18:59 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-08 15:48:03 +0200
commit7103ad34b0025f2b584b3b8ab93e990e831b25d8 (patch)
tree13881911c64afb995f33b2af011be386d517f116 /cpukit/score/include/rtems/score/prioritybitmapimpl.h
parentscore: Define _Priority_Mask() once (diff)
downloadrtems-7103ad34b0025f2b584b3b8ab93e990e831b25d8.tar.bz2
score: Define _Priority_Bits_index() once
Diffstat (limited to 'cpukit/score/include/rtems/score/prioritybitmapimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/prioritybitmapimpl.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/cpukit/score/include/rtems/score/prioritybitmapimpl.h b/cpukit/score/include/rtems/score/prioritybitmapimpl.h
index fa37189d97..ac4c275ea6 100644
--- a/cpukit/score/include/rtems/score/prioritybitmapimpl.h
+++ b/cpukit/score/include/rtems/score/prioritybitmapimpl.h
@@ -93,19 +93,24 @@ RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask(
#endif
}
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
/**
- * This method returns the bit index position for the specified priority.
- *
- * @param[in] _priority is the priority for which we need the index.
+ * @brief Returns the bit index position for the specified major or minor bit
+ * number.
*
- * @retval This method returns the array index into the priority bit map.
+ * @param bit_number The bit number for which we need an index.
*
- * @note This may simply be a pass through to a CPU dependent implementation.
+ * @return The corresponding array index into the priority bit map.
*/
-#define _Priority_Bits_index( _priority ) \
- _CPU_Priority_bits_index( _priority )
+RTEMS_INLINE_ROUTINE unsigned int _Priority_Bits_index(
+ unsigned int bit_number
+)
+{
+#if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
+ return _CPU_Priority_bits_index( bit_number );
+#else
+ return bit_number;
#endif
+}
/**
* This function returns the major portion of the_priority.
@@ -125,23 +130,6 @@ RTEMS_INLINE_ROUTINE unsigned int _Priority_Minor( unsigned int the_priority )
return the_priority % 16;
}
-#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
-
-/**
- * This function translates the bit numbers returned by the bit scan
- * of a priority bit field into something suitable for use as
- * a major or minor component of a priority.
- */
-
-RTEMS_INLINE_ROUTINE unsigned int _Priority_Bits_index(
- unsigned int bit_number
-)
-{
- return bit_number;
-}
-
-#endif
-
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize(
Priority_bit_map_Control *bit_map
)