summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/posix/semaphoreimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/posix/semaphoreimpl.h')
-rw-r--r--cpukit/include/rtems/posix/semaphoreimpl.h43
1 files changed, 31 insertions, 12 deletions
diff --git a/cpukit/include/rtems/posix/semaphoreimpl.h b/cpukit/include/rtems/posix/semaphoreimpl.h
index b662d001cb..7f322c21c0 100644
--- a/cpukit/include/rtems/posix/semaphoreimpl.h
+++ b/cpukit/include/rtems/posix/semaphoreimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -11,9 +13,26 @@
* COPYRIGHT (c) 1989-2013.
* 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_POSIX_SEMAPHOREIMPL_H
@@ -34,7 +53,7 @@ extern "C" {
*/
#define POSIX_SEMAPHORE_MAGIC 0x5d367fe7UL
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *
+static inline POSIX_Semaphore_Control *
_POSIX_Semaphore_Allocate_unprotected( void )
{
return (POSIX_Semaphore_Control *)
@@ -47,31 +66,31 @@ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *
* This routine frees a semaphore control block to the
* inactive chain of free semaphore control blocks.
*/
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
+static inline void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
}
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get(
+static inline POSIX_Semaphore_Control *_POSIX_Semaphore_Get(
sem_t *sem
)
{
return RTEMS_CONTAINER_OF( sem, POSIX_Semaphore_Control, Semaphore );
}
-RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_named( const sem_t *sem )
+static inline bool _POSIX_Semaphore_Is_named( const sem_t *sem )
{
return sem->_Semaphore._Queue._name != NULL;
}
-RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_busy( const sem_t *sem )
+static inline bool _POSIX_Semaphore_Is_busy( const sem_t *sem )
{
return sem->_Semaphore._Queue._heads != NULL;
}
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Initialize(
+static inline void _POSIX_Semaphore_Initialize(
sem_t *sem,
const char *name,
unsigned int value
@@ -81,7 +100,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Initialize(
_Semaphore_Initialize_named( &sem->_Semaphore, name, value );
}
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Destroy( sem_t *sem )
+static inline void _POSIX_Semaphore_Destroy( sem_t *sem )
{
sem->_flags = 0;
_Semaphore_Destroy( &sem->_Semaphore );
@@ -97,7 +116,7 @@ void _POSIX_Semaphore_Delete( POSIX_Semaphore_Control *the_semaphore );
/**
* @brief POSIX Semaphore Namespace Remove
*/
-RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
+static inline void _POSIX_Semaphore_Namespace_remove (
POSIX_Semaphore_Control *the_semaphore
)
{
@@ -107,7 +126,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
);
}
-RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get_by_name(
+static inline POSIX_Semaphore_Control *_POSIX_Semaphore_Get_by_name(
const char *name,
size_t *name_length_p,
Objects_Get_by_name_error *error