summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline/rtems/score/priority.inl
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-05-08 04:55:53 +0000
committerChris Johns <chrisj@rtems.org>2009-05-08 04:55:53 +0000
commit199ccded5dbc4dabb7e4fd5a2772eed6e571d444 (patch)
tree12c832f55d56161ad0ed3ae4e8fab785596883db /cpukit/score/inline/rtems/score/priority.inl
parent2009-05-07 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-199ccded5dbc4dabb7e4fd5a2772eed6e571d444.tar.bz2
2009-05-08 Chris Johns <chrisj@rtems.org>
* cpukit/libblock/src/bdpart.c, libmisc/shell/main_msdosfmt.c, libmisc/shell/main_rm.c, libnetworking/libc/gethostnamadr.c, score/include/rtems/score/bitfield.h, score/inline/rtems/score/priority.inl: Remove warnings.
Diffstat (limited to 'cpukit/score/inline/rtems/score/priority.inl')
-rw-r--r--cpukit/score/inline/rtems/score/priority.inl29
1 files changed, 21 insertions, 8 deletions
diff --git a/cpukit/score/inline/rtems/score/priority.inl b/cpukit/score/inline/rtems/score/priority.inl
index 0c94046acb..f03570e27d 100644
--- a/cpukit/score/inline/rtems/score/priority.inl
+++ b/cpukit/score/inline/rtems/score/priority.inl
@@ -64,22 +64,22 @@ RTEMS_INLINE_ROUTINE bool _Priority_Is_valid (
* This function returns the major portion of the_priority.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Priority_Major (
+RTEMS_INLINE_ROUTINE Priority_Bit_map_control _Priority_Major (
Priority_Control the_priority
)
{
- return ( the_priority / 16 );
+ return (Priority_Bit_map_control)( the_priority / 16 );
}
/**
* This function returns the minor portion of the_priority.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Priority_Minor (
+RTEMS_INLINE_ROUTINE Priority_Bit_map_control _Priority_Minor (
Priority_Control the_priority
)
{
- return ( the_priority % 16 );
+ return (Priority_Bit_map_control)( the_priority % 16 );
}
#if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE )
@@ -89,13 +89,24 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Minor (
* number passed to it.
*/
-RTEMS_INLINE_ROUTINE uint32_t _Priority_Mask (
+RTEMS_INLINE_ROUTINE Priority_Bit_map_control _Priority_Mask (
uint32_t bit_number
)
{
- return (0x8000u >> bit_number);
+ return (Priority_Bit_map_control)(0x8000u >> bit_number);
}
+/**
+ * This function returns the mask bit inverted.
+ */
+
+RTEMS_INLINE_ROUTINE Priority_Bit_map_control _Priority_Mask_invert (
+ uint32_t mask
+)
+{
+ return (Priority_Bit_map_control)(~mask);
+}
+
/**
* This function translates the bit numbers returned by the bit scan
@@ -180,11 +191,13 @@ RTEMS_INLINE_ROUTINE void _Priority_Initialize_information(
mask = _Priority_Mask( major );
the_priority_map->ready_major = mask;
- the_priority_map->block_major = ~mask;
+ /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */
+ the_priority_map->block_major = (Priority_Bit_map_control)(~((uint32_t)mask));
mask = _Priority_Mask( minor );
the_priority_map->ready_minor = mask;
- the_priority_map->block_minor = ~mask;
+ /* Add _Priority_Mask_invert to non-generic bitfield then change this code. */
+ the_priority_map->block_minor = (Priority_Bit_map_control)(~((uint32_t)mask));
}
/**