forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2009-05-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
2009-05-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
* score/include/rtems/system.h: Added
|
* score/include/rtems/system.h: Added
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ struct Heap_Block_struct {
|
|||||||
* to store the flag.
|
* to store the flag.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HEAP_PREV_USED 1 /* indicates previous block is in use */
|
#define HEAP_PREV_USED 1u /* indicates previous block is in use */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following constants reflect various requirements of the
|
* The following constants reflect various requirements of the
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset (
|
|||||||
* @note The cast of an address to an uint32_t makes this code
|
* @note The cast of an address to an uint32_t makes this code
|
||||||
* dependent on an addresses being thirty two bits.
|
* 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 *left,
|
||||||
void *right
|
void *right
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -376,11 +376,11 @@ RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
|
|||||||
* @return This method returns the total amount of memory
|
* @return This method returns the total amount of memory
|
||||||
* allocated to the heap.
|
* allocated to the heap.
|
||||||
*/
|
*/
|
||||||
RTEMS_INLINE_ROUTINE uint32_t _Heap_Get_size (
|
RTEMS_INLINE_ROUTINE int32_t _Heap_Get_size (
|
||||||
Heap_Control *the_heap
|
Heap_Control *the_heap
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return the_heap->end - the_heap->begin;
|
return _Addresses_Subtract( the_heap->end, the_heap->begin );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_node(
|
|||||||
*
|
*
|
||||||
* @return This method returns the class portion of the specified object ID.
|
* @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
|
Objects_Id id
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Mask (
|
|||||||
uint32_t bit_number
|
uint32_t bit_number
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return (0x8000 >> bit_number);
|
return (0x8000u >> bit_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,15 +58,19 @@ RTEMS_INLINE_ROUTINE void _TOD_Get_timeval(
|
|||||||
struct timeval *time
|
struct timeval *time
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
|
suseconds_t useconds;
|
||||||
|
|
||||||
_ISR_Disable(level);
|
_ISR_Disable(level);
|
||||||
_TOD_Get( &now );
|
_TOD_Get( &now );
|
||||||
_ISR_Enable(level);
|
_ISR_Enable(level);
|
||||||
|
|
||||||
|
useconds = (suseconds_t)now.tv_nsec;
|
||||||
|
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
|
||||||
|
|
||||||
time->tv_sec = now.tv_sec;
|
time->tv_sec = now.tv_sec;
|
||||||
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
|
time->tv_usec = useconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|||||||
Reference in New Issue
Block a user