19 #ifndef _RTEMS_SCORE_ADDRESS_H 20 #define _RTEMS_SCORE_ADDRESS_H 22 #include <rtems/score/cpu.h> 55 return (
void *)((uintptr_t)base + offset);
76 return (
void *)((uintptr_t)base - offset);
95 return (intptr_t) ( (
const char *) left - (
const char *) right );
114 return ( (uintptr_t) address % CPU_ALIGNMENT ) == 0;
139 return (address >= base && address <= limit);
160 uintptr_t mask = alignment - (uintptr_t)1;
161 return (
void*)(((uintptr_t)address + mask) & ~mask);
182 uintptr_t mask = alignment - (uintptr_t)1;
183 return (
void*)((uintptr_t)address & ~mask);
RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract(const void *left, const void *right)
Subtract two addresses.
Definition: address.h:90
RTEMS_INLINE_ROUTINE void * _Addresses_Subtract_offset(const void *base, uintptr_t offset)
Subtract offset from offset.
Definition: address.h:71
RTEMS_INLINE_ROUTINE void * _Addresses_Align_down(void *address, size_t alignment)
Align address to nearest multiple of alignment, truncating.
Definition: address.h:177
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
RTEMS_INLINE_ROUTINE void * _Addresses_Add_offset(const void *base, uintptr_t offset)
Add offset to an address.
Definition: address.h:50
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned(const void *address)
Is address aligned.
Definition: address.h:110
RTEMS_INLINE_ROUTINE void * _Addresses_Align_up(void *address, size_t alignment)
Align address to nearest multiple of alignment, rounding up.
Definition: address.h:155
RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range(const void *address, const void *base, const void *limit)
Is address in range.
Definition: address.h:133