summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems/config.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/sapi/include/rtems/config.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/sapi/include/rtems/config.h')
-rw-r--r--cpukit/sapi/include/rtems/config.h397
1 files changed, 0 insertions, 397 deletions
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
deleted file mode 100644
index 6b97376511..0000000000
--- a/cpukit/sapi/include/rtems/config.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/**
- * @file
- *
- * @brief Table of User Defined Configuration Parameters
- *
- * This include file contains the table of user defined configuration
- * parameters.
- */
-
-/*
- * COPYRIGHT (c) 1989-2014.
- * 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_CONFIG_H
-#define _RTEMS_CONFIG_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Unlimited object support. Changes the configuration table entry for POSIX
- * or RTEMS APIs to bounded only by the memory of the work-space.
- *
- * Use the macro to define the resource unlimited before placing in
- * the configuration table.
- */
-
-#include <rtems/score/object.h>
-#define RTEMS_UNLIMITED_OBJECTS OBJECTS_UNLIMITED_OBJECTS
-
-#define rtems_resource_unlimited(resource) \
- ( resource | RTEMS_UNLIMITED_OBJECTS )
-
-#define rtems_resource_is_unlimited(resource) \
- _Objects_Is_unlimited(resource)
-
-#define rtems_resource_maximum_per_allocation(resource) \
- _Objects_Maximum_per_allocation(resource)
-
-#include <rtems/score/watchdog.h>
-
-/*
- * This is kind of kludgy but it allows targets to totally ignore the
- * optional APIs like POSIX safely.
- */
-
-#ifdef RTEMS_POSIX_API
-#include <rtems/posix/config.h>
-#else
-typedef void *posix_api_configuration_table;
-#endif
-
-#include <rtems/rtems/config.h>
-
-#include <rtems/extension.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
-/*
- * The following records define the Multiprocessor Configuration
- * Table. This table defines the multiprocessor system
- * characteristics which must be known by RTEMS in a multiprocessor
- * system.
- */
-typedef struct {
- /** This is the local node number. */
- uint32_t node;
- /** This is the maximum number of nodes in system. */
- uint32_t maximum_nodes;
- /** This is the maximum number of global objects. */
- uint32_t maximum_global_objects;
- /** This is the maximum number of proxies. */
- uint32_t maximum_proxies;
-
- /**
- * The MPCI Receive server is assumed to have a stack of at least
- * minimum stack size. This field specifies the amount of extra
- * stack this task will be given in bytes.
- */
- uint32_t extra_mpci_receive_server_stack;
-
- /** This is a pointer to User/BSP provided MPCI Table. */
- rtems_mpci_table *User_mpci_table;
-} rtems_multiprocessing_table;
-#endif
-
-/**
- * @brief Task stack allocator initialization hook.
- *
- * @param[in] stack_space_size is the size of the stack space in bytes.
- */
-typedef void (*rtems_stack_allocate_init_hook)( size_t stack_space_size );
-
-/**
- * @brief Task stack allocator hook.
- *
- * @param[in] stack_size is the Size of the task stack in bytes.
- *
- * @retval NULL Not enough memory.
- * @retval other Pointer to task stack.
- */
-typedef void *(*rtems_stack_allocate_hook)( size_t stack_size );
-
-/**
- * @brief Task stack deallocator hook.
- *
- * @param[in] addr is a pointer to previously allocated task stack.
- */
-typedef void (*rtems_stack_free_hook)( void *addr );
-
-/*
- * The following records define the Configuration Table. The
- * information contained in this table is required in all
- * RTEMS systems, whether single or multiprocessor. This
- * table primarily defines the following:
- *
- * + location and size of the RTEMS Workspace
- * + microseconds per clock tick
- * + clock ticks per task timeslice
- * + required number of each object type for each API configured
- */
-typedef struct {
- /**
- * This field specifies the size in bytes of the RTEMS Workspace.
- */
- uintptr_t work_space_size;
-
- /**
- * This field specifies the size in bytes of the RTEMS thread stack space.
- */
- uintptr_t stack_space_size;
-
- /**
- * This field specifies the maximum number of dynamically installed
- * used extensions.
- */
- uint32_t maximum_extensions;
-
- /**
- * This field contains the maximum number of POSIX API
- * keys which are configured for this application.
- */
- uint32_t maximum_keys;
-
- /**
- * This field contains the maximum number of POSIX API
- * key value pairs which are configured for this application.
- *
- * @note There can be potentially be a key/value pair for
- * every thread to use every key. But normally this
- * many are not needed in a system.
- */
- uint32_t maximum_key_value_pairs;
-
- /**
- * This field specifies the number of microseconds which elapse
- * between clock ticks. This is the basis for RTEMS timing.
- */
- uint32_t microseconds_per_tick;
-
- /**
- * This field specifies the number of ticks in each task's timeslice.
- */
- uint32_t ticks_per_timeslice;
-
- /**
- * This element points to the BSP's optional idle task which may override
- * the default one provided with RTEMS.
- */
- void *(*idle_task)( uintptr_t );
-
- /**
- * This field specifies the size of the IDLE task's stack. If less than or
- * equal to the minimum stack size, then the IDLE task will have the minimum
- * stack size.
- */
- uint32_t idle_task_stack_size;
-
- /**
- * This field specifies the size of the interrupt stack. If less than or
- * equal to the minimum stack size, then the interrupt stack will be of
- * minimum stack size.
- */
- uint32_t interrupt_stack_size;
-
- /**
- * @brief Optional task stack allocator initialization hook.
- */
- rtems_stack_allocate_init_hook stack_allocate_init_hook;
-
- /**
- * @brief Optional task stack allocator hook.
- */
- rtems_stack_allocate_hook stack_allocate_hook;
-
- /**
- * @brief Optional task stack free hook.
- */
- rtems_stack_free_hook stack_free_hook;
-
- /**
- * If this element is TRUE, then RTEMS will zero the Executive Workspace.
- * When this element is FALSE, it is assumed that the BSP or invoking
- * environment has ensured that memory was cleared before RTEMS was
- * invoked.
- */
- bool do_zero_of_workspace;
-
- /**
- * @brief Specifies if a unified work area is used or not.
- *
- * If this element is @a true, then the RTEMS Workspace and the C Program
- * Heap use the same heap, otherwise they use separate heaps.
- */
- bool unified_work_area;
-
- /**
- * @brief Specifies if the stack allocator avoids the work space.
- *
- * If this element is @a true, then the stack allocator must not allocate the
- * thread stacks from the RTEMS Workspace, otherwise it should allocate the
- * thread stacks from the RTEMS Workspace.
- */
- bool stack_allocator_avoids_work_space;
-
- #ifdef RTEMS_SMP
- bool smp_enabled;
- #endif
-
- uint32_t number_of_initial_extensions;
- const rtems_extensions_table *User_extension_table;
- #if defined(RTEMS_MULTIPROCESSING)
- rtems_multiprocessing_table *User_multiprocessing_table;
- #endif
- #ifdef RTEMS_SMP
- uint32_t maximum_processors;
- #endif
-} rtems_configuration_table;
-
-/**
- * This is the configuration table generated by confdefs.h.
- */
-extern const rtems_configuration_table Configuration;
-
-#if defined(RTEMS_MULTIPROCESSING)
- /**
- * This points to the multiprocessing configuration table.
- */
- extern rtems_multiprocessing_table *_Configuration_MP_table;
-#endif
-
-#if defined(RTEMS_MULTIPROCESSING)
- /**
- * @brief RTEMS multiprocessing configuration table.
- *
- * This is the RTEMS Multiprocessing Configuration Table expected to
- * be generated by confdefs.h.
- */
- extern rtems_multiprocessing_table Multiprocessing_configuration;
-
- /*
- * This is the default Multiprocessing Configuration Table.
- * It is used in single processor configurations.
- */
- extern const rtems_multiprocessing_table
- _Initialization_Default_multiprocessing_table;
-#endif
-
-
-/*
- * Some handy macros to avoid dependencies on either the BSP
- * or the exact format of the configuration table.
- */
-
-#define rtems_configuration_get_unified_work_area() \
- (Configuration.unified_work_area)
-
-#define rtems_configuration_get_stack_allocator_avoids_work_space() \
- (Configuration.stack_allocator_avoids_work_space)
-
-#define rtems_configuration_get_stack_space_size() \
- (Configuration.stack_space_size)
-
-#define rtems_configuration_get_work_space_size() \
- (Configuration.work_space_size + \
- (rtems_configuration_get_stack_allocator_avoids_work_space() ? \
- 0 : rtems_configuration_get_stack_space_size()))
-
-#define rtems_configuration_get_maximum_extensions() \
- (Configuration.maximum_extensions)
-
-#define rtems_configuration_get_microseconds_per_tick() \
- (Configuration.microseconds_per_tick)
-#define rtems_configuration_get_milliseconds_per_tick() \
- (Configuration.microseconds_per_tick / 1000)
-#define rtems_configuration_get_nanoseconds_per_tick() \
- (_Watchdog_Nanoseconds_per_tick)
-
-#define rtems_configuration_get_ticks_per_timeslice() \
- (Configuration.ticks_per_timeslice)
-
-#define rtems_configuration_get_idle_task() \
- (Configuration.idle_task)
-
-#define rtems_configuration_get_idle_task_stack_size() \
- (Configuration.idle_task_stack_size)
-
-#define rtems_configuration_get_interrupt_stack_size() \
- (Configuration.interrupt_stack_size)
-
-#define rtems_configuration_get_stack_allocate_init_hook() \
- (Configuration.stack_allocate_init_hook)
-
-#define rtems_configuration_get_stack_allocate_hook() \
- (Configuration.stack_allocate_hook)
-
-#define rtems_configuration_get_stack_free_hook() \
- (Configuration.stack_free_hook)
-
- /**
- * This macro assists in accessing the field which indicates whether
- * RTEMS is responsible for zeroing the Executive Workspace.
- */
-#define rtems_configuration_get_do_zero_of_workspace() \
- (Configuration.do_zero_of_workspace)
-
-#define rtems_configuration_get_number_of_initial_extensions() \
- (Configuration.number_of_initial_extensions)
-
-#define rtems_configuration_get_user_extension_table() \
- (Configuration.User_extension_table)
-
-#if defined(RTEMS_MULTIPROCESSING)
- #define rtems_configuration_get_user_multiprocessing_table() \
- (Configuration.User_multiprocessing_table)
-#else
- #define rtems_configuration_get_user_multiprocessing_table() \
- NULL
-#endif
-
-/**
- * @brief Returns true if the SMP mode of operation is enabled, and false
- * otherwise.
- *
- * In uni-processor configurations this is a compile-time constant which
- * evaluates to false.
- *
- * @retval true SMP mode of operation is enabled.
- * @retval false Otherwise.
- */
-#ifdef RTEMS_SMP
- #define rtems_configuration_is_smp_enabled() \
- (Configuration.smp_enabled)
-#else
- #define rtems_configuration_is_smp_enabled() \
- false
-#endif
-
-/**
- * @brief Returns the configured maximum count of processors.
- *
- * The actual number of processors available for the application will be less
- * than or equal to the configured maximum count of processors.
- *
- * On single-processor configurations this is a compile time constant which
- * evaluates to one.
- *
- * @return The configured maximum count of processors.
- */
-#ifdef RTEMS_SMP
- #define rtems_configuration_get_maximum_processors() \
- (Configuration.maximum_processors)
-#else
- #define rtems_configuration_get_maximum_processors() \
- 1
-#endif
-
-#define rtems_configuration_get_rtems_api_configuration() \
- (&Configuration_RTEMS_API)
-
-#define rtems_configuration_get_posix_api_configuration() \
- (&Configuration_POSIX_API)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-/* end of include file */