diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-05 19:37:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-05 19:37:28 +0000 |
commit | f16a6fe73a77b1ebdc962f0639289b8a7e05ae6e (patch) | |
tree | 0509b359198624a4640c0831667674640ff3fffa /cpukit/score/inline/rtems/score | |
parent | 2009-05-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-f16a6fe73a77b1ebdc962f0639289b8a7e05ae6e.tar.bz2 |
2009-05-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/heap.h,
score/inline/rtems/score/address.inl,
score/inline/rtems/score/heap.inl,
score/inline/rtems/score/object.inl,
score/inline/rtems/score/priority.inl,
score/inline/rtems/score/tod.inl: Remove warnings.
Diffstat (limited to 'cpukit/score/inline/rtems/score')
-rw-r--r-- | cpukit/score/inline/rtems/score/address.inl | 2 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/heap.inl | 4 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/object.inl | 2 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/priority.inl | 2 | ||||
-rw-r--r-- | cpukit/score/inline/rtems/score/tod.inl | 8 |
5 files changed, 11 insertions, 7 deletions
diff --git a/cpukit/score/inline/rtems/score/address.inl b/cpukit/score/inline/rtems/score/address.inl index 2efab75df0..b0e418e647 100644 --- a/cpukit/score/inline/rtems/score/address.inl +++ b/cpukit/score/inline/rtems/score/address.inl @@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset ( * @note The cast of an address to an uint32_t makes this code * dependent on an addresses being thirty two bits. */ -RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract ( +RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( void *left, void *right ) diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl index 09d6e5b0cd..b8bb124423 100644 --- a/cpukit/score/inline/rtems/score/heap.inl +++ b/cpukit/score/inline/rtems/score/heap.inl @@ -376,11 +376,11 @@ RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( * @return This method returns the total amount of memory * allocated to the heap. */ -RTEMS_INLINE_ROUTINE uint32_t _Heap_Get_size ( +RTEMS_INLINE_ROUTINE int32_t _Heap_Get_size ( Heap_Control *the_heap ) { - return the_heap->end - the_heap->begin; + return _Addresses_Subtract( the_heap->end, the_heap->begin ); } /**@}*/ diff --git a/cpukit/score/inline/rtems/score/object.inl b/cpukit/score/inline/rtems/score/object.inl index 6f7d272c96..f722620421 100644 --- a/cpukit/score/inline/rtems/score/object.inl +++ b/cpukit/score/inline/rtems/score/object.inl @@ -107,7 +107,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node( * * @return This method returns the class portion of the specified object ID. */ -RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( +RTEMS_INLINE_ROUTINE Objects_Maximum _Objects_Get_index( Objects_Id id ) { diff --git a/cpukit/score/inline/rtems/score/priority.inl b/cpukit/score/inline/rtems/score/priority.inl index b752a4fc4e..0c94046acb 100644 --- a/cpukit/score/inline/rtems/score/priority.inl +++ b/cpukit/score/inline/rtems/score/priority.inl @@ -93,7 +93,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Mask ( uint32_t bit_number ) { - return (0x8000 >> bit_number); + return (0x8000u >> bit_number); } diff --git a/cpukit/score/inline/rtems/score/tod.inl b/cpukit/score/inline/rtems/score/tod.inl index c7e0130859..67a37862e9 100644 --- a/cpukit/score/inline/rtems/score/tod.inl +++ b/cpukit/score/inline/rtems/score/tod.inl @@ -58,15 +58,19 @@ RTEMS_INLINE_ROUTINE void _TOD_Get_timeval( struct timeval *time ) { - ISR_Level level; + ISR_Level level; struct timespec now; + suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); + useconds = (suseconds_t)now.tv_nsec; + useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; + time->tv_sec = now.tv_sec; - time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; + time->tv_usec = useconds; } /**@}*/ |