forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -25,6 +25,8 @@
|
|||||||
#include <rtems/score/wkspace.h>
|
#include <rtems/score/wkspace.h>
|
||||||
#include <rtems/score/protectedheap.h>
|
#include <rtems/score/protectedheap.h>
|
||||||
|
|
||||||
|
#include <rtems/extensionimpl.h>
|
||||||
|
|
||||||
#include <rtems/rtems/barrierimpl.h>
|
#include <rtems/rtems/barrierimpl.h>
|
||||||
#include <rtems/rtems/messageimpl.h>
|
#include <rtems/rtems/messageimpl.h>
|
||||||
#include <rtems/rtems/semimpl.h>
|
#include <rtems/rtems/semimpl.h>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
|
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <rtems/monitor.h>
|
#include <rtems/monitor.h>
|
||||||
|
#include <rtems/extensionimpl.h>
|
||||||
#include <rtems/rtems/messageimpl.h>
|
#include <rtems/rtems/messageimpl.h>
|
||||||
#include <rtems/rtems/semimpl.h>
|
#include <rtems/rtems/semimpl.h>
|
||||||
#if defined(RTEMS_POSIX_API)
|
#if defined(RTEMS_POSIX_API)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ include_rtems_HEADERS = include/confdefs.h
|
|||||||
include_rtems_HEADERS += include/rtems/chain.h
|
include_rtems_HEADERS += include/rtems/chain.h
|
||||||
include_rtems_HEADERS += include/rtems/config.h
|
include_rtems_HEADERS += include/rtems/config.h
|
||||||
include_rtems_HEADERS += include/rtems/extension.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/fatal.h
|
||||||
include_rtems_HEADERS += include/rtems/init.h
|
include_rtems_HEADERS += include/rtems/init.h
|
||||||
include_rtems_HEADERS += include/rtems/io.h
|
include_rtems_HEADERS += include/rtems/io.h
|
||||||
@@ -19,8 +20,6 @@ include_rtems_HEADERS += include/rtems/timespec.h
|
|||||||
|
|
||||||
EXTRA_DIST = include/rtems/README
|
EXTRA_DIST = include/rtems/README
|
||||||
|
|
||||||
include_rtems_HEADERS += inline/rtems/extension.inl
|
|
||||||
|
|
||||||
## src
|
## src
|
||||||
AM_CPPFLAGS += -D__RTEMS_INSIDE__
|
AM_CPPFLAGS += -D__RTEMS_INSIDE__
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,6 @@
|
|||||||
#ifndef _RTEMS_EXTENSION_H
|
#ifndef _RTEMS_EXTENSION_H
|
||||||
#define _RTEMS_EXTENSION_H
|
#define _RTEMS_EXTENSION_H
|
||||||
|
|
||||||
#ifndef SAPI_EXT_EXTERN
|
|
||||||
#define SAPI_EXT_EXTERN extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -29,20 +25,11 @@ extern "C" {
|
|||||||
#include <rtems/rtems/status.h>
|
#include <rtems/rtems/status.h>
|
||||||
#include <rtems/rtems/types.h>
|
#include <rtems/rtems/types.h>
|
||||||
|
|
||||||
SAPI_EXT_EXTERN Objects_Information _Extension_Information;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Objects_Control Object;
|
Objects_Control Object;
|
||||||
User_extensions_Control Extension;
|
User_extensions_Control Extension;
|
||||||
} Extension_Control;
|
} Extension_Control;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize extension manager.
|
|
||||||
*
|
|
||||||
* This routine initializes all extension manager related data structures.
|
|
||||||
*/
|
|
||||||
void _Extension_Manager_initialization(void);
|
|
||||||
|
|
||||||
typedef User_extensions_routine
|
typedef User_extensions_routine
|
||||||
rtems_extension RTEMS_COMPILER_DEPRECATED_ATTRIBUTE;
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -15,8 +15,27 @@
|
|||||||
* http://www.rtems.com/license/LICENSE.
|
* http://www.rtems.com/license/LICENSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __EXTENSION_MANAGER_inl
|
#ifndef _RTEMS_EXTENSIONIMPL_H
|
||||||
#define __EXTENSION_MANAGER_inl
|
#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 )
|
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
|
||||||
{
|
{
|
||||||
@@ -46,5 +65,9 @@ RTEMS_INLINE_ROUTINE bool _Extension_Is_null (
|
|||||||
return ( the_extension == NULL );
|
return ( the_extension == NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
@@ -44,6 +44,10 @@ $(PROJECT_INCLUDE)/rtems/extension.h: include/rtems/extension.h $(PROJECT_INCLUD
|
|||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/extension.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/extension.h
|
||||||
PREINSTALL_FILES += $(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)
|
$(PROJECT_INCLUDE)/rtems/fatal.h: include/rtems/fatal.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/fatal.h
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/fatal.h
|
||||||
PREINSTALL_FILES += $(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
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/timespec.h
|
||||||
PREINSTALL_FILES += $(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)
|
$(PROJECT_LIB)/libsapi.a: libsapi.a $(PROJECT_LIB)/$(dirstamp)
|
||||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/libsapi.a
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/libsapi.a
|
||||||
TMPINSTALL_FILES += $(PROJECT_LIB)/libsapi.a
|
TMPINSTALL_FILES += $(PROJECT_LIB)/libsapi.a
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
#include <rtems/config.h>
|
#include <rtems/config.h>
|
||||||
#include <rtems/debug.h>
|
#include <rtems/debug.h>
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extensionimpl.h>
|
||||||
#include <rtems/fatal.h>
|
#include <rtems/fatal.h>
|
||||||
#include <rtems/init.h>
|
#include <rtems/init.h>
|
||||||
#include <rtems/io.h>
|
#include <rtems/io.h>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <rtems/rtems/support.h>
|
#include <rtems/rtems/support.h>
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extensionimpl.h>
|
||||||
|
|
||||||
void _Extension_Manager_initialization(void)
|
void _Extension_Manager_initialization(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/userextimpl.h>
|
#include <rtems/score/userextimpl.h>
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extensionimpl.h>
|
||||||
|
|
||||||
rtems_status_code rtems_extension_create(
|
rtems_status_code rtems_extension_create(
|
||||||
rtems_name name,
|
rtems_name name,
|
||||||
|
|||||||
@@ -22,6 +22,4 @@
|
|||||||
/* instantiate extension data */
|
/* instantiate extension data */
|
||||||
#define SAPI_EXT_EXTERN
|
#define SAPI_EXT_EXTERN
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/extensionimpl.h>
|
||||||
#include <rtems/extension.h>
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extensionimpl.h>
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/userextimpl.h>
|
#include <rtems/score/userextimpl.h>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <rtems/rtems/support.h>
|
#include <rtems/rtems/support.h>
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extensionimpl.h>
|
||||||
|
|
||||||
rtems_status_code rtems_extension_ident(
|
rtems_status_code rtems_extension_ident(
|
||||||
rtems_name name,
|
rtems_name name,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <rtems/rtems/tasks.h>
|
#include <rtems/rtems/tasks.h>
|
||||||
#include <rtems/rtems/dpmem.h>
|
#include <rtems/rtems/dpmem.h>
|
||||||
#include <rtems/rtems/event.h>
|
#include <rtems/rtems/event.h>
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extensionimpl.h>
|
||||||
#include <rtems/fatal.h>
|
#include <rtems/fatal.h>
|
||||||
#include <rtems/init.h>
|
#include <rtems/init.h>
|
||||||
#include <rtems/score/isr.h>
|
#include <rtems/score/isr.h>
|
||||||
@@ -277,7 +277,7 @@ uninitialized =
|
|||||||
|
|
||||||
/*eventset.h*/ 0 +
|
/*eventset.h*/ 0 +
|
||||||
|
|
||||||
/*extension.h*/ (sizeof _Extension_Information) +
|
/*extensionimpl.h*/ (sizeof _Extension_Information) +
|
||||||
|
|
||||||
/*fatal.h*/ 0 +
|
/*fatal.h*/ 0 +
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user