21 #ifndef _RTEMS_SCORE_ADDRESS_H 22 #define _RTEMS_SCORE_ADDRESS_H 24 #include <rtems/score/cpu.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 );
119 return ( (uintptr_t) address % CPU_ALIGNMENT ) == 0;
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.
Definition: address.h:182
RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range(const void *address, const void *base, const void *limit)
Checks if address is in range.
Definition: address.h:138
RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract(const void *left, const void *right)
Subtracts two addresses.
Definition: address.h:95
RTEMS_INLINE_ROUTINE void * _Addresses_Subtract_offset(const void *base, uintptr_t offset)
Subtracts offset from an address.
Definition: address.h:76
RTEMS_INLINE_ROUTINE void * _Addresses_Align_up(void *address, size_t alignment)
Aligns address to nearest multiple of alignment, rounding up.
Definition: address.h:160
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned(const void *address)
Checks if address is aligned.
Definition: address.h:115
RTEMS_INLINE_ROUTINE void * _Addresses_Add_offset(const void *base, uintptr_t offset)
Adds offset to an address.
Definition: address.h:55