diff options
Diffstat (limited to 'cpukit/include/rtems/score/address.h')
-rw-r--r-- | cpukit/include/rtems/score/address.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/cpukit/include/rtems/score/address.h b/cpukit/include/rtems/score/address.h index f963252172..e6a06f5996 100644 --- a/cpukit/include/rtems/score/address.h +++ b/cpukit/include/rtems/score/address.h @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + /** * @file * @@ -11,9 +13,26 @@ * COPYRIGHT (c) 1989-2006. * On-Line Applications Research Corporation (OAR). * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _RTEMS_SCORE_ADDRESS_H @@ -50,7 +69,7 @@ extern "C" { * * @return This method returns the resulting address. */ -RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( +static inline void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) @@ -71,7 +90,7 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( * @return This method returns the resulting address. */ -RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset ( +static inline void *_Addresses_Subtract_offset ( const void *base, uintptr_t offset ) @@ -90,7 +109,7 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Subtract_offset ( * * @return This method returns the resulting address. */ -RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract( +static inline intptr_t _Addresses_Subtract( const void *left, const void *right ) @@ -110,7 +129,7 @@ RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract( * @retval true The @a address is aligned. * @retval false The @a address is not aligned. */ -RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned( +static inline bool _Addresses_Is_aligned( const void *address ) { @@ -133,7 +152,7 @@ RTEMS_INLINE_ROUTINE bool _Addresses_Is_aligned( * @retval true The @a address is within the memory range specified * @retval false The @a address is not within the memory range specified. */ -RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range ( +static inline bool _Addresses_Is_in_range ( const void *address, const void *base, const void *limit @@ -155,7 +174,7 @@ RTEMS_INLINE_ROUTINE bool _Addresses_Is_in_range ( * * @return Returns the aligned address. */ -RTEMS_INLINE_ROUTINE void *_Addresses_Align_up( +static inline void *_Addresses_Align_up( void *address, size_t alignment ) @@ -177,7 +196,7 @@ RTEMS_INLINE_ROUTINE void *_Addresses_Align_up( * * @return Returns the aligned address. */ -RTEMS_INLINE_ROUTINE void *_Addresses_Align_down( +static inline void *_Addresses_Align_down( void *address, size_t alignment ) |