summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/freechainimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/score/freechainimpl.h')
-rw-r--r--cpukit/include/rtems/score/freechainimpl.h33
1 files changed, 26 insertions, 7 deletions
diff --git a/cpukit/include/rtems/score/freechainimpl.h b/cpukit/include/rtems/score/freechainimpl.h
index 6c3f1bb6d7..3f02472961 100644
--- a/cpukit/include/rtems/score/freechainimpl.h
+++ b/cpukit/include/rtems/score/freechainimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
/*
* Copyright (c) 2013 Gedare Bloom.
*
- * 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_FREECHAINIMPL_H
@@ -49,7 +68,7 @@ typedef void *( *Freechain_Allocator )( size_t size );
* @param number_nodes The initial number of nodes.
* @param node_size The node size.
*/
-RTEMS_INLINE_ROUTINE void _Freechain_Initialize(
+static inline void _Freechain_Initialize(
Freechain_Control *freechain,
void *initial_nodes,
size_t number_nodes,
@@ -69,7 +88,7 @@ RTEMS_INLINE_ROUTINE void _Freechain_Initialize(
*
* @param freechain The freechain control.
*/
-RTEMS_INLINE_ROUTINE bool _Freechain_Is_empty(
+static inline bool _Freechain_Is_empty(
const Freechain_Control *freechain
)
{
@@ -83,7 +102,7 @@ RTEMS_INLINE_ROUTINE bool _Freechain_Is_empty(
*
* @param freechain The freechain control.
*/
-RTEMS_INLINE_ROUTINE void *_Freechain_Pop( Freechain_Control *freechain )
+static inline void *_Freechain_Pop( Freechain_Control *freechain )
{
return _Chain_Get_first_unprotected( &freechain->Free );
}
@@ -94,7 +113,7 @@ RTEMS_INLINE_ROUTINE void *_Freechain_Pop( Freechain_Control *freechain )
* @param freechain The freechain control.
* @param node The node to push back. The node shall not be @c NULL.
*/
-void RTEMS_INLINE_ROUTINE _Freechain_Push(
+void static inline _Freechain_Push(
Freechain_Control *freechain,
void *node
)