mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 06:58:19 +00:00
Remove unused functions.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user