summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/heap.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/score/heap.h')
-rw-r--r--cpukit/include/rtems/score/heap.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/cpukit/include/rtems/score/heap.h b/cpukit/include/rtems/score/heap.h
index 62a81cbad9..8777e8b548 100644
--- a/cpukit/include/rtems/score/heap.h
+++ b/cpukit/include/rtems/score/heap.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -12,9 +14,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_HEAP_H
@@ -412,7 +431,7 @@ uintptr_t _Heap_No_extend(
*
* @return The @a value aligned to the given @a alignment, rounded up.
*/
-RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
+static inline uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
@@ -433,7 +452,7 @@ RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
*
* @return The minimal Heap Block size for the given @a page_size.
*/
-RTEMS_INLINE_ROUTINE uintptr_t _Heap_Min_block_size( uintptr_t page_size )
+static inline uintptr_t _Heap_Min_block_size( uintptr_t page_size )
{
return _Heap_Align_up( sizeof( Heap_Block ), page_size );
}
@@ -445,7 +464,7 @@ RTEMS_INLINE_ROUTINE uintptr_t _Heap_Min_block_size( uintptr_t page_size )
*
* @return The worst case overhead to manage a memory area.
*/
-RTEMS_INLINE_ROUTINE uintptr_t _Heap_Area_overhead(
+static inline uintptr_t _Heap_Area_overhead(
uintptr_t page_size
)
{
@@ -474,7 +493,7 @@ RTEMS_INLINE_ROUTINE uintptr_t _Heap_Area_overhead(
*
* @return The size with administration and alignment overhead for one allocation.
*/
-RTEMS_INLINE_ROUTINE uintptr_t _Heap_Size_with_overhead(
+static inline uintptr_t _Heap_Size_with_overhead(
uintptr_t page_size,
uintptr_t size,
uintptr_t alignment