21 #ifndef _RTEMS_SCORE_ADDRESS_H 22 #define _RTEMS_SCORE_ADDRESS_H 60 return (
void *)((uintptr_t)base + offset);
81 return (
void *)((uintptr_t)base - offset);
100 return (intptr_t) ( (
const char *) left - (
const char *) right );
144 return (address >= base && address <= limit);
165 uintptr_t mask = alignment - (uintptr_t)1;
166 return (
void*)(((uintptr_t)address + mask) & ~mask);
187 uintptr_t mask = alignment - (uintptr_t)1;
188 return (
void*)((uintptr_t)address & ~mask);
RTEMS_INLINE_ROUTINE void * _Addresses_Align_down(void *address, size_t alignment)
Aligns address to nearest multiple of alignment, truncating.
RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range(const void *address, const void *base, const void *limit)
Checks if address is in range.
RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract(const void *left, const void *right)
Subtracts two addresses.
RTEMS_INLINE_ROUTINE void * _Addresses_Subtract_offset(const void *base, uintptr_t offset)
Subtracts offset from an address.
RTEMS_INLINE_ROUTINE void * _Addresses_Align_up(void *address, size_t alignment)
Aligns address to nearest multiple of alignment, rounding up.
SPARC CPU Department Source.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned(const void *address)
Checks if address is aligned.
RTEMS_INLINE_ROUTINE void * _Addresses_Add_offset(const void *base, uintptr_t offset)
Adds offset to an address.