summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/keyimpl.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /cpukit/posix/include/rtems/posix/keyimpl.h
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'cpukit/posix/include/rtems/posix/keyimpl.h')
-rw-r--r--cpukit/posix/include/rtems/posix/keyimpl.h177
1 files changed, 0 insertions, 177 deletions
diff --git a/cpukit/posix/include/rtems/posix/keyimpl.h b/cpukit/posix/include/rtems/posix/keyimpl.h
deleted file mode 100644
index 1148123638..0000000000
--- a/cpukit/posix/include/rtems/posix/keyimpl.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * @file
- *
- * @brief Private Inlined Routines for POSIX Key's
- *
- * This include file contains the static inline implementation of the private
- * inlined routines for POSIX key's.
- */
-
-/*
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
- * Copyright (c) 2016 embedded brains GmbH.
- *
- * 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.
- */
-
-#include <rtems/posix/key.h>
-#include <rtems/score/chainimpl.h>
-#include <rtems/score/freechain.h>
-#include <rtems/score/objectimpl.h>
-#include <rtems/score/percpu.h>
-
-#ifndef _RTEMS_POSIX_KEYIMPL_H
-#define _RTEMS_POSIX_KEYIMPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @addtogroup POSIX_KEY
- *
- * @{
- */
-
-/**
- * @brief The information control block used to manage this class of objects.
- */
-extern Objects_Information _POSIX_Keys_Information;
-
-/**
- * @brief This freechain is used as a memory pool for POSIX_Keys_Key_value_pair.
- */
-extern Freechain_Control _POSIX_Keys_Keypool;
-
-#define POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( node ) \
- RTEMS_CONTAINER_OF( node, POSIX_Keys_Key_value_pair, Lookup_node )
-
-/**
- * @brief Allocate a keys control block.
- *
- * This function allocates a keys control block from
- * the inactive chain of free keys control blocks.
- */
-
-RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
-{
- return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
-}
-
-/**
- * @brief Free a keys control block.
- *
- * This routine frees a keys control block to the
- * inactive chain of free keys control blocks.
- */
-RTEMS_INLINE_ROUTINE 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 )
-{
- return (POSIX_Keys_Control *)
- _Objects_Get_no_protection( (Objects_Id) key, &_POSIX_Keys_Information );
-}
-
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_acquire(
- Thread_Control *the_thread,
- ISR_lock_Context *lock_context
-)
-{
- _ISR_lock_ISR_disable_and_acquire( &the_thread->Keys.Lock, lock_context );
-}
-
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_release(
- Thread_Control *the_thread,
- ISR_lock_Context *lock_context
-)
-{
- _ISR_lock_Release_and_ISR_enable( &the_thread->Keys.Lock, lock_context );
-}
-
-POSIX_Keys_Key_value_pair * _POSIX_Keys_Key_value_allocate( void );
-
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_free(
- POSIX_Keys_Key_value_pair *key_value_pair
-)
-{
- _Chain_Extract_unprotected( &key_value_pair->Key_node );
- _Freechain_Put( &_POSIX_Keys_Keypool, key_value_pair );
-}
-
-RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Key_value_equal(
- const void *left,
- const RBTree_Node *right
-)
-{
- const pthread_key_t *the_left;
- const POSIX_Keys_Key_value_pair *the_right;
-
- the_left = left;
- the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
-
- return *the_left == the_right->key;
-}
-
-RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Key_value_less(
- const void *left,
- const RBTree_Node *right
-)
-{
- const pthread_key_t *the_left;
- const POSIX_Keys_Key_value_pair *the_right;
-
- the_left = left;
- the_right = POSIX_KEYS_RBTREE_NODE_TO_KEY_VALUE_PAIR( right );
-
- return *the_left < the_right->key;
-}
-
-RTEMS_INLINE_ROUTINE 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(
- pthread_key_t key,
- const Thread_Control *the_thread
-)
-{
- return _RBTree_Find_inline(
- &the_thread->Keys.Key_value_pairs,
- &key,
- _POSIX_Keys_Key_value_equal,
- _POSIX_Keys_Key_value_less,
- _POSIX_Keys_Key_value_map
- );
-}
-
-RTEMS_INLINE_ROUTINE void _POSIX_Keys_Key_value_insert(
- pthread_key_t key,
- POSIX_Keys_Key_value_pair *key_value_pair,
- Thread_Control *the_thread
-)
-{
- _RBTree_Insert_inline(
- &the_thread->Keys.Key_value_pairs,
- &key_value_pair->Lookup_node,
- &key,
- _POSIX_Keys_Key_value_less
- );
-}
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */