Address Handler


Functions

RTEMS_INLINE_ROUTINE void * _Addresses_Add_offset (void *base, uint32_t offset)
 Add Offset to Address.
RTEMS_INLINE_ROUTINE void * _Addresses_Subtract_offset (void *base, uint32_t offset)
 Subtract Offset from Offset.
RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract (void *left, void *right)
 Subtract Two Offsets.
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned (void *address)
 Is Address Aligned.
RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range (void *address, void *base, void *limit)
 Is Address In Range.

Detailed Description

This handler encapsulates functionality which abstracts address manipulation in a portable manner.

Function Documentation

RTEMS_INLINE_ROUTINE void* _Addresses_Add_offset ( void *  base,
uint32_t  offset 
)

Add Offset to Address.

This function is used to add an offset to a base address. It returns the resulting address. This address is typically converted to an access type before being used further.

Parameters:
[in] base is the base address.
[in] offset is the offset to add to base.
Returns:
This method returns the resulting address.

Referenced by _Heap_Block_at(), and _Heap_User_area().

RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned ( void *  address  ) 

Is Address Aligned.

This function returns TRUE if the given address is correctly aligned for this processor and FALSE otherwise. Proper alignment is based on correctness and efficiency.

Parameters:
[in] address is the address being checked for alignment.
Returns:
This method returns TRUE if the address is aligned and FALSE otherwise.

References CPU_ALIGNMENT, and TRUE.

RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range ( void *  address,
void *  base,
void *  limit 
)

Is Address In Range.

This function returns TRUE if the given address is within the memory range specified and FALSE otherwise. base is the address of the first byte in the memory range and limit is the address of the last byte in the memory range. The base address is assumed to be lower than the limit address.

Parameters:
[in] address is the address to check.
[in] base is the lowest address of the range to check against.
[in] limit is the highest address of the range to check against.
Returns:
This method returns TRUE if the given address is within the memory range specified and FALSE otherwise.

Referenced by _Heap_Is_block_in().

RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract ( void *  left,
void *  right 
)

Subtract Two Offsets.

This function is used to subtract two addresses. It returns the resulting offset.

Parameters:
[in] left is the address on the left hand side of the subtraction.
[in] right is the address on the right hand side of the subtraction.
Returns:
This method returns the resulting address.
Note:
The cast of an address to an uint32_t makes this code dependent on an addresses being thirty two bits.

RTEMS_INLINE_ROUTINE void* _Addresses_Subtract_offset ( void *  base,
uint32_t  offset 
)

Subtract Offset from Offset.

This function is used to subtract an offset from a base address. It returns the resulting address. This address is typically converted to an access type before being used further.

Parameters:
[in] base is the base address.
[in] offset is the offset to subtract to base.
Returns:
This method returns the resulting address.


Generated on Mon Sep 8 06:16:43 2008 for RTEMSSuperCore by  doxygen 1.5.6