rtems: Create dpmem implementation header

Move implementation specific parts of dpmem.h and dpmem.inl into new
header file dpmemimpl.h.  The dpmem.h contains now only the application
visible API.
This commit is contained in:
Sebastian Huber
2013-07-23 15:12:54 +02:00
parent e151eb1a36
commit 562815cf0b
14 changed files with 57 additions and 61 deletions
@@ -28,6 +28,7 @@
#include <rtems/extensionimpl.h>
#include <rtems/rtems/barrierimpl.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/rtems/messageimpl.h>
#include <rtems/rtems/semimpl.h>
+1 -1
View File
@@ -24,6 +24,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/cache.h
include_rtems_rtems_HEADERS += include/rtems/rtems/clock.h
include_rtems_rtems_HEADERS += include/rtems/rtems/config.h
include_rtems_rtems_HEADERS += include/rtems/rtems/dpmem.h
include_rtems_rtems_HEADERS += include/rtems/rtems/dpmemimpl.h
include_rtems_rtems_HEADERS += include/rtems/rtems/event.h
include_rtems_rtems_HEADERS += include/rtems/rtems/eventimpl.h
include_rtems_rtems_HEADERS += include/rtems/rtems/intr.h
@@ -65,7 +66,6 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/signalmp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h
endif
include_rtems_rtems_HEADERS += inline/rtems/rtems/dpmem.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/part.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/ratemon.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl
+3 -31
View File
@@ -32,24 +32,13 @@
#ifndef _RTEMS_RTEMS_DPMEM_H
#define _RTEMS_RTEMS_DPMEM_H
/**
* This constant is defined to extern most of the time when using
* this header file. However by defining it to nothing, the data
* declared in this header file can be instantiated. This is done
* in a single per manager file.
*/
#ifndef RTEMS_DPMEM_EXTERN
#define RTEMS_DPMEM_EXTERN extern
#endif
#include <rtems/rtems/types.h>
#include <rtems/rtems/status.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/score/object.h>
#include <rtems/rtems/support.h>
#include <rtems/rtems/status.h>
/**
* @defgroup ClassicDPMEM Dual Ported Memory
*
@@ -76,19 +65,6 @@ typedef struct {
uint32_t length;
} Dual_ported_memory_Control;
/**
* @brief Define the internal Dual Ported Memory information
* The following define the internal Dual Ported Memory information.
*/
RTEMS_DPMEM_EXTERN Objects_Information _Dual_ported_memory_Information;
/**
* @brief Dual Ported Memory Manager Initialization
*
* This routine performs the initialization necessary for this manager.
*/
void _Dual_ported_memory_Manager_initialization(void);
/**
* @brief Creates a port into a dual-ported memory area.
*
@@ -193,15 +169,11 @@ rtems_status_code rtems_port_internal_to_external(
void **external
);
#ifndef __RTEMS_APPLICATION__
#include <rtems/rtems/dpmem.inl>
#endif
/**@}*/
#ifdef __cplusplus
}
#endif
/**@}*/
#endif
/* end of include file */
@@ -1,8 +1,9 @@
/**
* @file rtems/rtems/dpmem.inl
* @file
*
* This include file contains the inline routine used in conjunction
* with the Dual Ported Memory Manager
* @ingroup ClassicDPMEMImpl
*
* @brief Dual Ported Memory Manager Implementation
*/
/* COPYRIGHT (c) 1989-2008.
@@ -13,18 +14,42 @@
* http://www.rtems.com/license/LICENSE.
*/
#ifndef _RTEMS_RTEMS_DPMEM_H
# error "Never use <rtems/rtems/dpmem.inl> directly; include <rtems/rtems/dpmem.h> instead."
#endif
#ifndef _RTEMS_RTEMS_DPMEM_INL
#define _RTEMS_RTEMS_DPMEM_INL
#include <rtems/rtems/dpmem.h>
/**
* @addtogroup ClassicDPMEM
* @{
* @defgroup ClassicDPMEMImpl Dual Ported Memory Manager Implementation
*
* @ingroup ClassicDPMEM
*
* @{
*/
/**
* This constant is defined to extern most of the time when using
* this header file. However by defining it to nothing, the data
* declared in this header file can be instantiated. This is done
* in a single per manager file.
*/
#ifndef RTEMS_DPMEM_EXTERN
#define RTEMS_DPMEM_EXTERN extern
#endif
/**
* @brief Define the internal Dual Ported Memory information
* The following define the internal Dual Ported Memory information.
*/
RTEMS_DPMEM_EXTERN Objects_Information _Dual_ported_memory_Information;
/**
* @brief Dual Ported Memory Manager Initialization
*
* This routine performs the initialization necessary for this manager.
*/
void _Dual_ported_memory_Manager_initialization(void);
/**
* @brief Allocates a port control block from the inactive chain
* of free port control blocks.
@@ -86,5 +111,9 @@ RTEMS_INLINE_ROUTINE bool _Dual_ported_memory_Is_null(
/**@}*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */
+4 -4
View File
@@ -67,6 +67,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/dpmem.h: include/rtems/rtems/dpmem.h $(PROJECT_IN
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/dpmem.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/dpmem.h
$(PROJECT_INCLUDE)/rtems/rtems/dpmemimpl.h: include/rtems/rtems/dpmemimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/dpmemimpl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/dpmemimpl.h
$(PROJECT_INCLUDE)/rtems/rtems/event.h: include/rtems/rtems/event.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/event.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/event.h
@@ -205,10 +209,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h: include/rtems/rtems/taskmp.h $(PROJECT_
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/taskmp.h
endif
$(PROJECT_INCLUDE)/rtems/rtems/dpmem.inl: inline/rtems/rtems/dpmem.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/dpmem.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/dpmem.inl
$(PROJECT_INCLUDE)/rtems/rtems/part.inl: inline/rtems/rtems/part.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/part.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/part.inl
+1 -1
View File
@@ -23,7 +23,7 @@
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
+1 -2
View File
@@ -22,10 +22,9 @@
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/dpmem.h>
rtems_status_code rtems_port_create(
rtems_name name,
+1 -2
View File
@@ -21,5 +21,4 @@
/* instantiate semaphore data */
#define RTEMS_DPMEM_EXTERN
#include <rtems/system.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
+1 -2
View File
@@ -22,10 +22,9 @@
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/dpmem.h>
rtems_status_code rtems_port_delete(
rtems_id id
+1 -2
View File
@@ -22,10 +22,9 @@
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/dpmem.h>
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
+1 -2
View File
@@ -22,10 +22,9 @@
#include <rtems/rtems/statusimpl.h>
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/dpmem.h>
rtems_status_code rtems_port_ident(
rtems_name name,
+1 -2
View File
@@ -22,10 +22,9 @@
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/score/object.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/dpmem.h>
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
+1 -1
View File
@@ -29,7 +29,7 @@
#include <rtems/rtems/barrierimpl.h>
#include <rtems/rtems/clock.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/messageimpl.h>
#if defined(RTEMS_MULTIPROCESSING)
+2 -2
View File
@@ -20,7 +20,7 @@
#include <rtems/score/copyrt.h>
#include <rtems/rtems/clock.h>
#include <rtems/rtems/tasks.h>
#include <rtems/rtems/dpmem.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/rtems/eventimpl.h>
#include <rtems/extensionimpl.h>
#include <rtems/fatal.h>
@@ -267,7 +267,7 @@ uninitialized =
/*debug.h*/ (sizeof _Debug_Level) +
/*dpmem.h*/ (sizeof _Dual_ported_memory_Information) +
/*dpmemimpl.h*/ (sizeof _Dual_ported_memory_Information) +
/*eventimpl.h*/ (sizeof _Event_Sync_state) +