Remove unused functions.

This commit is contained in:
Ralf Corsepius
2007-12-07 02:58:44 +00:00
parent edb55fd7d9
commit 8272b10998
2 changed files with 0 additions and 151 deletions

View File

@@ -30,82 +30,6 @@ STATIC INLINE void *_Addresses_Add_offset (
size_t offset
);
/*
* _Addresses_Subtract_offset
*
* DESCRIPTION:
*
* 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.
*/
STATIC INLINE void *_Addresses_Subtract_offset(
void *base,
size_t offset
);
/*
* _Addresses_Add
*
* DESCRIPTION:
*
* This function is used to add two addresses. It returns the
* resulting address. This address is typically converted to an
* access type before being used further.
*/
STATIC INLINE void *_Addresses_Add (
void *left,
void *right
);
/*
* _Addresses_Subtract
*
* DESCRIPTION:
*
* This function is used to subtract two addresses. It returns the
* resulting offset.
*/
STATIC INLINE ptrdiff_t _Addresses_Subtract (
void *left,
void *right
);
/*
* _Addresses_Is_aligned
*
* DESCRIPTION:
*
* 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.
*/
STATIC INLINE boolean _Addresses_Is_aligned (
void *address
);
/*
* _Addresses_Is_in_range
*
* DESCRIPTION:
*
* 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.
*/
STATIC INLINE boolean _Addresses_Is_in_range (
void *address,
void *base,
void *limit
);
#include "address.inl"
#endif

View File

@@ -14,7 +14,6 @@
#define __INLINE_ADDRESSES_inl
#include <stddef.h>
#include <stdint.h>
/*PAGE
*
@@ -30,79 +29,5 @@ STATIC INLINE void *_Addresses_Add_offset (
return (base + offset);
}
/*PAGE
*
* _Addresses_Subtract_offset
*
*/
STATIC INLINE void *_Addresses_Subtract_offset (
void *base,
size_t offset
)
{
return (base - offset);
}
/*PAGE
*
* _Addresses_Add
*
* NOTE: The cast of an address to an unsigned32 makes this code
* dependent on an addresses being thirty two bits.
*/
STATIC INLINE void *_Addresses_Add (
void *left,
void *right
)
{
return (left + (ptrdiff_t) right);
}
/*PAGE
*
* _Addresses_Subtract
*
* NOTE: The cast of an address to an unsigned32 makes this code
* dependent on an addresses being thirty two bits.
*/
STATIC INLINE ptrdiff_t _Addresses_Subtract (
void *left,
void *right
)
{
return (left - right);
}
/*PAGE
*
* _Addresses_Is_aligned
*
*/
STATIC INLINE boolean _Addresses_Is_aligned (
void *address
)
{
return ( ( (intptr_t)address % 4 ) == 0 );
}
/*PAGE
*
* _Addresses_Is_aligned
*
*/
STATIC INLINE boolean _Addresses_Is_in_range (
void *address,
void *base,
void *limit
)
{
return ( address >= base && address <= limit );
}
#endif
/* end of include file */