38#ifndef _RTEMS_SCORE_ADDRESS_H
39#define _RTEMS_SCORE_ADDRESS_H
41#include <rtems/score/cpu.h>
72static inline void *_Addresses_Add_offset (
77 return (
void *)((uintptr_t)base + offset);
93static inline void *_Addresses_Subtract_offset (
98 return (
void *)((uintptr_t)base - offset);
112static inline intptr_t _Addresses_Subtract(
117 return (intptr_t) ( (
const char *) left - (
const char *) right );
132static inline bool _Addresses_Is_aligned(
136 return ( (uintptr_t) address % CPU_ALIGNMENT ) == 0;
155static inline bool _Addresses_Is_in_range (
161 return (address >= base && address <= limit);
177static inline void *_Addresses_Align_up(
182 uintptr_t mask = alignment - (uintptr_t)1;
183 return (
void*)(((uintptr_t)address + mask) & ~mask);
199static inline void *_Addresses_Align_down(
204 uintptr_t mask = alignment - (uintptr_t)1;
205 return (
void*)((uintptr_t)address & ~mask);