diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-23 10:04:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-23 15:12:51 +0200 |
commit | ac252bdce027a45a3e7094e92508a9d8f9525720 (patch) | |
tree | 916ba44927b88d633da6f13eea181163a6d989d8 | |
parent | sapi: Merge rbtree API into one file (diff) | |
download | rtems-ac252bdce027a45a3e7094e92508a9d8f9525720.tar.bz2 |
sapi: Create extension implementation header
Move implementation specific parts of extension.h and extension.inl into
new header file extensionimpl.h. The extension.h contains now only the
application visible API.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/resource_snapshot.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-object.c | 1 | ||||
-rw-r--r-- | cpukit/sapi/Makefile.am | 3 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/extension.h | 17 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/extensionimpl.h (renamed from cpukit/sapi/inline/rtems/extension.inl) | 27 | ||||
-rw-r--r-- | cpukit/sapi/preinstall.am | 8 | ||||
-rw-r--r-- | cpukit/sapi/src/exinit.c | 2 | ||||
-rw-r--r-- | cpukit/sapi/src/extension.c | 2 | ||||
-rw-r--r-- | cpukit/sapi/src/extensioncreate.c | 2 | ||||
-rw-r--r-- | cpukit/sapi/src/extensiondata.c | 4 | ||||
-rw-r--r-- | cpukit/sapi/src/extensiondelete.c | 2 | ||||
-rw-r--r-- | cpukit/sapi/src/extensionident.c | 2 | ||||
-rw-r--r-- | testsuites/sptests/spsize/size.c | 4 |
13 files changed, 41 insertions, 35 deletions
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c index 3318d38ddd..917da8a2ee 100644 --- a/cpukit/libcsupport/src/resource_snapshot.c +++ b/cpukit/libcsupport/src/resource_snapshot.c @@ -25,6 +25,8 @@ #include <rtems/score/wkspace.h> #include <rtems/score/protectedheap.h> +#include <rtems/extensionimpl.h> + #include <rtems/rtems/barrierimpl.h> #include <rtems/rtems/messageimpl.h> #include <rtems/rtems/semimpl.h> diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c index 6cdf59761a..3ef9276c9a 100644 --- a/cpukit/libmisc/monitor/mon-object.c +++ b/cpukit/libmisc/monitor/mon-object.c @@ -20,6 +20,7 @@ #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ #include <rtems.h> #include <rtems/monitor.h> +#include <rtems/extensionimpl.h> #include <rtems/rtems/messageimpl.h> #include <rtems/rtems/semimpl.h> #if defined(RTEMS_POSIX_API) diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am index ca96203b76..43f5de84c4 100644 --- a/cpukit/sapi/Makefile.am +++ b/cpukit/sapi/Makefile.am @@ -7,6 +7,7 @@ include_rtems_HEADERS = include/confdefs.h include_rtems_HEADERS += include/rtems/chain.h include_rtems_HEADERS += include/rtems/config.h include_rtems_HEADERS += include/rtems/extension.h +include_rtems_HEADERS += include/rtems/extensionimpl.h include_rtems_HEADERS += include/rtems/fatal.h include_rtems_HEADERS += include/rtems/init.h include_rtems_HEADERS += include/rtems/io.h @@ -19,8 +20,6 @@ include_rtems_HEADERS += include/rtems/timespec.h EXTRA_DIST = include/rtems/README -include_rtems_HEADERS += inline/rtems/extension.inl - ## src AM_CPPFLAGS += -D__RTEMS_INSIDE__ diff --git a/cpukit/sapi/include/rtems/extension.h b/cpukit/sapi/include/rtems/extension.h index d4f7fde532..7b2bfbd7ea 100644 --- a/cpukit/sapi/include/rtems/extension.h +++ b/cpukit/sapi/include/rtems/extension.h @@ -16,10 +16,6 @@ #ifndef _RTEMS_EXTENSION_H #define _RTEMS_EXTENSION_H -#ifndef SAPI_EXT_EXTERN -#define SAPI_EXT_EXTERN extern -#endif - #ifdef __cplusplus extern "C" { #endif @@ -29,20 +25,11 @@ extern "C" { #include <rtems/rtems/status.h> #include <rtems/rtems/types.h> -SAPI_EXT_EXTERN Objects_Information _Extension_Information; - typedef struct { Objects_Control Object; User_extensions_Control Extension; } Extension_Control; -/** - * @brief Initialize extension manager. - * - * This routine initializes all extension manager related data structures. - */ -void _Extension_Manager_initialization(void); - typedef User_extensions_routine rtems_extension RTEMS_COMPILER_DEPRECATED_ATTRIBUTE; @@ -251,10 +238,6 @@ rtems_status_code rtems_extension_delete( /** @} */ -#ifndef __RTEMS_APPLICATION__ -#include <rtems/extension.inl> -#endif - #ifdef __cplusplus } #endif diff --git a/cpukit/sapi/inline/rtems/extension.inl b/cpukit/sapi/include/rtems/extensionimpl.h index 0d0cfc2320..1b80fdfff7 100644 --- a/cpukit/sapi/inline/rtems/extension.inl +++ b/cpukit/sapi/include/rtems/extensionimpl.h @@ -15,8 +15,27 @@ * http://www.rtems.com/license/LICENSE. */ -#ifndef __EXTENSION_MANAGER_inl -#define __EXTENSION_MANAGER_inl +#ifndef _RTEMS_EXTENSIONIMPL_H +#define _RTEMS_EXTENSIONIMPL_H + +#include <rtems/extension.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef SAPI_EXT_EXTERN +#define SAPI_EXT_EXTERN extern +#endif + +SAPI_EXT_EXTERN Objects_Information _Extension_Information; + +/** + * @brief Initialize extension manager. + * + * This routine initializes all extension manager related data structures. + */ +void _Extension_Manager_initialization(void); RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { @@ -46,5 +65,9 @@ RTEMS_INLINE_ROUTINE bool _Extension_Is_null ( return ( the_extension == NULL ); } +#ifdef __cplusplus +} +#endif + #endif /* end of include file */ diff --git a/cpukit/sapi/preinstall.am b/cpukit/sapi/preinstall.am index 873ab71c1d..2b247bce58 100644 --- a/cpukit/sapi/preinstall.am +++ b/cpukit/sapi/preinstall.am @@ -44,6 +44,10 @@ $(PROJECT_INCLUDE)/rtems/extension.h: include/rtems/extension.h $(PROJECT_INCLUD $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/extension.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/extension.h +$(PROJECT_INCLUDE)/rtems/extensionimpl.h: include/rtems/extensionimpl.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/extensionimpl.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/extensionimpl.h + $(PROJECT_INCLUDE)/rtems/fatal.h: include/rtems/fatal.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/fatal.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/fatal.h @@ -80,10 +84,6 @@ $(PROJECT_INCLUDE)/rtems/timespec.h: include/rtems/timespec.h $(PROJECT_INCLUDE) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/timespec.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/timespec.h -$(PROJECT_INCLUDE)/rtems/extension.inl: inline/rtems/extension.inl $(PROJECT_INCLUDE)/rtems/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/extension.inl -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/extension.inl - $(PROJECT_LIB)/libsapi.a: libsapi.a $(PROJECT_LIB)/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_LIB)/libsapi.a TMPINSTALL_FILES += $(PROJECT_LIB)/libsapi.a diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index f83bf30c61..d235d59bd9 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -32,7 +32,7 @@ #include <rtems/system.h> #include <rtems/config.h> #include <rtems/debug.h> -#include <rtems/extension.h> +#include <rtems/extensionimpl.h> #include <rtems/fatal.h> #include <rtems/init.h> #include <rtems/io.h> diff --git a/cpukit/sapi/src/extension.c b/cpukit/sapi/src/extension.c index 29ceebcec5..ffa0dcecc5 100644 --- a/cpukit/sapi/src/extension.c +++ b/cpukit/sapi/src/extension.c @@ -26,7 +26,7 @@ #include <rtems/rtems/support.h> #include <rtems/score/object.h> #include <rtems/score/thread.h> -#include <rtems/extension.h> +#include <rtems/extensionimpl.h> void _Extension_Manager_initialization(void) { diff --git a/cpukit/sapi/src/extensioncreate.c b/cpukit/sapi/src/extensioncreate.c index f963e0a421..0590a1374c 100644 --- a/cpukit/sapi/src/extensioncreate.c +++ b/cpukit/sapi/src/extensioncreate.c @@ -24,7 +24,7 @@ #include <rtems/score/object.h> #include <rtems/score/thread.h> #include <rtems/score/userextimpl.h> -#include <rtems/extension.h> +#include <rtems/extensionimpl.h> rtems_status_code rtems_extension_create( rtems_name name, diff --git a/cpukit/sapi/src/extensiondata.c b/cpukit/sapi/src/extensiondata.c index b604274a87..8e77f1d00f 100644 --- a/cpukit/sapi/src/extensiondata.c +++ b/cpukit/sapi/src/extensiondata.c @@ -22,6 +22,4 @@ /* instantiate extension data */ #define SAPI_EXT_EXTERN -#include <rtems/system.h> -#include <rtems/extension.h> - +#include <rtems/extensionimpl.h> diff --git a/cpukit/sapi/src/extensiondelete.c b/cpukit/sapi/src/extensiondelete.c index 7e4957eafc..0c013f32ad 100644 --- a/cpukit/sapi/src/extensiondelete.c +++ b/cpukit/sapi/src/extensiondelete.c @@ -19,7 +19,7 @@ #include "config.h" #endif -#include <rtems/extension.h> +#include <rtems/extensionimpl.h> #include <rtems/score/object.h> #include <rtems/score/thread.h> #include <rtems/score/userextimpl.h> diff --git a/cpukit/sapi/src/extensionident.c b/cpukit/sapi/src/extensionident.c index 3e19326124..7fa56e97be 100644 --- a/cpukit/sapi/src/extensionident.c +++ b/cpukit/sapi/src/extensionident.c @@ -23,7 +23,7 @@ #include <rtems/rtems/support.h> #include <rtems/score/object.h> #include <rtems/score/thread.h> -#include <rtems/extension.h> +#include <rtems/extensionimpl.h> rtems_status_code rtems_extension_ident( rtems_name name, diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c index 6f3f4c99b1..2754ce86c4 100644 --- a/testsuites/sptests/spsize/size.c +++ b/testsuites/sptests/spsize/size.c @@ -22,7 +22,7 @@ #include <rtems/rtems/tasks.h> #include <rtems/rtems/dpmem.h> #include <rtems/rtems/event.h> -#include <rtems/extension.h> +#include <rtems/extensionimpl.h> #include <rtems/fatal.h> #include <rtems/init.h> #include <rtems/score/isr.h> @@ -277,7 +277,7 @@ uninitialized = /*eventset.h*/ 0 + -/*extension.h*/ (sizeof _Extension_Information) + +/*extensionimpl.h*/ (sizeof _Extension_Information) + /*fatal.h*/ 0 + |