summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/rtems/semimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/rtems/semimpl.h')
-rw-r--r--cpukit/include/rtems/rtems/semimpl.h49
1 files changed, 34 insertions, 15 deletions
diff --git a/cpukit/include/rtems/rtems/semimpl.h b/cpukit/include/rtems/rtems/semimpl.h
index bc0b4d3a9d..5164c593f7 100644
--- a/cpukit/include/rtems/rtems/semimpl.h
+++ b/cpukit/include/rtems/rtems/semimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,9 +12,26 @@
/* COPYRIGHT (c) 1989-2008.
* 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_RTEMS_SEMIMPL_H
@@ -59,7 +78,7 @@ typedef enum {
SEMAPHORE_DISCIPLINE_FIFO
} Semaphore_Discipline;
-RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Get_flags(
+static inline uintptr_t _Semaphore_Get_flags(
const Semaphore_Control *the_semaphore
)
{
@@ -67,7 +86,7 @@ RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Get_flags(
return (uintptr_t) the_semaphore->Object.Node.previous;
}
-RTEMS_INLINE_ROUTINE void _Semaphore_Set_flags(
+static inline void _Semaphore_Set_flags(
Semaphore_Control *the_semaphore,
uintptr_t flags
)
@@ -76,14 +95,14 @@ RTEMS_INLINE_ROUTINE void _Semaphore_Set_flags(
the_semaphore->Object.Node.previous = (Chain_Node *) flags;
}
-RTEMS_INLINE_ROUTINE Semaphore_Variant _Semaphore_Get_variant(
+static inline Semaphore_Variant _Semaphore_Get_variant(
uintptr_t flags
)
{
return (Semaphore_Variant) ( flags & 0x7 );
}
-RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_variant(
+static inline uintptr_t _Semaphore_Set_variant(
uintptr_t flags,
Semaphore_Variant variant
)
@@ -91,14 +110,14 @@ RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_variant(
return flags | variant;
}
-RTEMS_INLINE_ROUTINE Semaphore_Discipline _Semaphore_Get_discipline(
+static inline Semaphore_Discipline _Semaphore_Get_discipline(
uintptr_t flags
)
{
return (Semaphore_Discipline) ( ( flags >> 3 ) & 0x1 );
}
-RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_discipline(
+static inline uintptr_t _Semaphore_Set_discipline(
uintptr_t flags,
Semaphore_Discipline discipline
)
@@ -107,20 +126,20 @@ RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Set_discipline(
}
#if defined(RTEMS_MULTIPROCESSING)
-RTEMS_INLINE_ROUTINE bool _Semaphore_Is_global(
+static inline bool _Semaphore_Is_global(
uintptr_t flags
)
{
return ( flags & 0x10 ) != 0;
}
-RTEMS_INLINE_ROUTINE uintptr_t _Semaphore_Make_global( uintptr_t flags )
+static inline uintptr_t _Semaphore_Make_global( uintptr_t flags )
{
return flags | 0x10;
}
#endif
-RTEMS_INLINE_ROUTINE const Thread_queue_Operations *_Semaphore_Get_operations(
+static inline const Thread_queue_Operations *_Semaphore_Get_operations(
uintptr_t flags
)
{
@@ -144,7 +163,7 @@ RTEMS_INLINE_ROUTINE const Thread_queue_Operations *_Semaphore_Get_operations(
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
+static inline Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
}
@@ -156,14 +175,14 @@ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
* This routine frees a semaphore control block to the
* inactive chain of free semaphore control blocks.
*/
-RTEMS_INLINE_ROUTINE void _Semaphore_Free (
+static inline void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
}
-RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get(
+static inline Semaphore_Control *_Semaphore_Get(
Objects_Id id,
Thread_queue_Context *queue_context
)