summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/posix/keyimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/include/rtems/posix/keyimpl.h')
-rw-r--r--cpukit/include/rtems/posix/keyimpl.h49
1 files changed, 34 insertions, 15 deletions
diff --git a/cpukit/include/rtems/posix/keyimpl.h b/cpukit/include/rtems/posix/keyimpl.h
index eed5d3fed2..2cc68eff3e 100644
--- a/cpukit/include/rtems/posix/keyimpl.h
+++ b/cpukit/include/rtems/posix/keyimpl.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -10,11 +12,28 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
- * Copyright (c) 2016 embedded brains GmbH.
+ * Copyright (c) 2016 embedded brains GmbH & Co. KG
+ *
+ * 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.
*
- * 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.
+ * 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.
*/
#include <rtems/posix/key.h>
@@ -51,7 +70,7 @@ extern Freechain_Control _POSIX_Keys_Keypool;
* the inactive chain of free keys control blocks.
*/
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
+static inline POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
}
@@ -62,20 +81,20 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
* This routine frees a keys control block to the
* inactive chain of free keys control blocks.
*/
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free(
+static inline void _POSIX_Keys_Free(
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
}
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get( pthread_key_t key )
+static inline POSIX_Keys_Control *_POSIX_Keys_Get( pthread_key_t key )
{
return (POSIX_Keys_Control *)
_Objects_Get_no_protection( (Objects_Id) key, &_POSIX_Keys_Information );
}
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_acquire(
+static inline void _POSIX_Keys_Key_value_acquire(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -83,7 +102,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_acquire(
_ISR_lock_ISR_disable_and_acquire( &the_thread->Keys.Lock, lock_context );
}
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_release(
+static inline void _POSIX_Keys_Key_value_release(
Thread_Control *the_thread,
ISR_lock_Context *lock_context
)
@@ -93,7 +112,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_release(
POSIX_Keys_Key_value_pair * _POSIX_Keys_Key_value_allocate( void );
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_free(
+static inline void _POSIX_Keys_Key_value_free(
POSIX_Keys_Key_value_pair *key_value_pair
)
{
@@ -101,7 +120,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_free(
_Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair );
}
-RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Key_value_equal(
+static inline bool _POSIX_Keys_Key_value_equal(
const void *left,
const RBTree_Node *right
)
@@ -115,7 +134,7 @@ RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Key_value_equal(
return *the_left == the_right->key;
}
-RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Key_value_less(
+static inline bool _POSIX_Keys_Key_value_less(
const void *left,
const RBTree_Node *right
)
@@ -129,12 +148,12 @@ RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Key_value_less(
return *the_left < the_right->key;
}
-RTEMS_INLINE_ROUTINE void *_POSIX_Keys_Key_value_map( RBTree_Node *node )
+static inline void *_POSIX_Keys_Key_value_map( RBTree_Node *node )
{
return POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( node );
}
-RTEMS_INLINE_ROUTINE POSIX_Keys_Key_value_pair *_POSIX_Keys_Key_value_find(
+static inline POSIX_Keys_Key_value_pair *_POSIX_Keys_Key_value_find(
pthread_key_t key,
const Thread_Control *the_thread
)
@@ -148,7 +167,7 @@ RTEMS_INLINE_ROUTINE POSIX_Keys_Key_value_pair *_POSIX_Keys_Key_value_find(
);
}
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_insert(
+static inline void _POSIX_Keys_Key_value_insert(
pthread_key_t key,
POSIX_Keys_Key_value_pair *key_value_pair,
Thread_Control *the_thread