summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/posixapi.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/posixapi.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/posixapi.h')
-rw-r--r--cpukit/posix/include/rtems/posix/posixapi.h146
1 files changed, 0 insertions, 146 deletions
diff --git a/cpukit/posix/include/rtems/posix/posixapi.h b/cpukit/posix/include/rtems/posix/posixapi.h
deleted file mode 100644
index 29394ab94e..0000000000
--- a/cpukit/posix/include/rtems/posix/posixapi.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * @file
- *
- * @brief POSIX API Implementation
- *
- * This include file defines the top level interface to the POSIX API
- * implementation in RTEMS.
- */
-
-/*
- * COPYRIGHT (c) 1989-2011.
- * 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.
- */
-
-#ifndef _RTEMS_POSIX_POSIXAPI_H
-#define _RTEMS_POSIX_POSIXAPI_H
-
-#include <rtems/config.h>
-#include <rtems/score/assert.h>
-#include <rtems/score/objectimpl.h>
-#include <rtems/score/onceimpl.h>
-#include <rtems/score/threadimpl.h>
-#include <rtems/seterr.h>
-
-#include <pthread.h>
-
-/**
- * @defgroup POSIXAPI RTEMS POSIX API
- *
- * RTEMS POSIX API definitions and modules.
- *
- */
-/**@{**/
-
-/**
- * @brief POSIX API Fatal domains.
- */
-typedef enum {
- POSIX_FD_PTHREAD, /**< A pthread thread error. */
- POSIX_FD_PTHREAD_ONCE /**< A pthread once error. */
-} POSIX_Fatal_domain;
-
-/**
- * @brief POSIX API Fatal error.
- *
- * A common method of rasing a POSIX API fatal error.
- *
- * @param[in] domain The POSIX error domain.
- * @param[in] eno The error number as defined in errno.h.
- */
-void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno );
-
-extern const int _POSIX_Get_by_name_error_table[ 3 ];
-
-RTEMS_INLINE_ROUTINE int _POSIX_Get_by_name_error(
- Objects_Get_by_name_error error
-)
-{
- _Assert( (size_t) error < RTEMS_ARRAY_SIZE( _POSIX_Get_by_name_error_table ) );
- return _POSIX_Get_by_name_error_table[ error ];
-}
-
-RTEMS_INLINE_ROUTINE int _POSIX_Get_error( Status_Control status )
-{
- return STATUS_GET_POSIX( status );
-}
-
-RTEMS_INLINE_ROUTINE int _POSIX_Get_error_after_wait(
- const Thread_Control *executing
-)
-{
- return _POSIX_Get_error( _Thread_Wait_get_status( executing ) );
-}
-
-RTEMS_INLINE_ROUTINE int _POSIX_Zero_or_minus_one_plus_errno(
- Status_Control status
-)
-{
- if ( status == STATUS_SUCCESSFUL ) {
- return 0;
- }
-
- rtems_set_errno_and_return_minus_one( _POSIX_Get_error( status ) );
-}
-
-/**
- * @brief Macro to generate a function body to get a POSIX object by
- * identifier.
- *
- * Generates a function body to get the object for the specified identifier.
- * Performs automatic initialization if requested and necessary. This is an
- * ugly macro, since C lacks support for templates.
- */
-#define _POSIX_Get_object_body( \
- type, \
- id, \
- queue_context, \
- info, \
- initializer, \
- init \
-) \
- Objects_Control *the_object; \
- if ( id == NULL ) { \
- return NULL; \
- } \
- _Thread_queue_Context_initialize( queue_context ); \
- the_object = _Objects_Get( \
- (Objects_Id) *id, \
- &queue_context->Lock_context.Lock_context, \
- info \
- ); \
- if ( the_object == NULL ) { \
- _Once_Lock(); \
- if ( *id == initializer ) { \
- init( id, NULL ); \
- } \
- _Once_Unlock(); \
- the_object = _Objects_Get( \
- (Objects_Id) *id, \
- &queue_context->Lock_context.Lock_context, \
- info \
- ); \
- } \
- return (type *) the_object
-
-/*
- * See also The Open Group Base Specifications Issue 7, IEEE Std 1003.1-2008,
- * 2016 Edition, subsection 2.9.9, Synchronization Object Copies and
- * Alternative Mappings.
- *
- * http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09_09
- */
-RTEMS_INLINE_ROUTINE bool _POSIX_Is_valid_pshared( int pshared )
-{
- return pshared == PTHREAD_PROCESS_PRIVATE ||
- pshared == PTHREAD_PROCESS_SHARED;
-}
-
-/** @} */
-
-#endif
-/* end of include file */