rtems: Create part implementation header

Move implementation specific parts of part.h and part.inl into new
header file partimpl.h.  The part.h contains now only the application
visible API.
This commit is contained in:
Sebastian Huber
2013-07-23 15:12:55 +02:00
parent e90b1dfdda
commit 8695cae269
17 changed files with 76 additions and 70 deletions
@@ -30,6 +30,7 @@
#include <rtems/rtems/barrierimpl.h>
#include <rtems/rtems/dpmemimpl.h>
#include <rtems/rtems/messageimpl.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/rtems/ratemonimpl.h>
#include <rtems/rtems/semimpl.h>
#include <rtems/rtems/timerimpl.h>
+1
View File
@@ -22,6 +22,7 @@
#include <rtems/monitor.h>
#include <rtems/extensionimpl.h>
#include <rtems/rtems/messageimpl.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/rtems/semimpl.h>
#if defined(RTEMS_POSIX_API)
#include <rtems/posix/pthreadimpl.h>
+1 -1
View File
@@ -36,6 +36,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/object.h
include_rtems_rtems_HEADERS += include/rtems/rtems/options.h
include_rtems_rtems_HEADERS += include/rtems/rtems/optionsimpl.h
include_rtems_rtems_HEADERS += include/rtems/rtems/part.h
include_rtems_rtems_HEADERS += include/rtems/rtems/partimpl.h
include_rtems_rtems_HEADERS += include/rtems/rtems/ratemon.h
include_rtems_rtems_HEADERS += include/rtems/rtems/ratemonimpl.h
include_rtems_rtems_HEADERS += include/rtems/rtems/region.h
@@ -68,7 +69,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/part.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl
include_rtems_rtems_HEADERS += inline/rtems/rtems/tasks.inl
+4 -39
View File
@@ -31,29 +31,14 @@
#ifndef _RTEMS_RTEMS_PART_H
#define _RTEMS_RTEMS_PART_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.
*
* Partition Manager -- Instantiate Data
*/
#ifndef RTEMS_PART_EXTERN
#define RTEMS_PART_EXTERN extern
#endif
#include <rtems/rtems/attr.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/attr.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
#include <rtems/rtems/types.h>
/**
* @defgroup ClassicPart Partitions
*
@@ -84,19 +69,6 @@ typedef struct {
Chain_Control Memory;
} Partition_Control;
/**
* The following defines the information control block used to
* manage this class of objects.
*/
RTEMS_PART_EXTERN Objects_Information _Partition_Information;
/**
* @brief Partition Manager Initialization
*
* This routine performs the initialization necessary for this manager.
*/
void _Partition_Manager_initialization(void);
/**
* @brief RTEMS Partition Create
*
@@ -189,18 +161,11 @@ rtems_status_code rtems_partition_return_buffer(
void *buffer
);
#ifndef __RTEMS_APPLICATION__
#include <rtems/rtems/part.inl>
#endif
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/rtems/partmp.h>
#endif
/**@}*/
#ifdef __cplusplus
}
#endif
/**@}*/
#endif
/* end of include file */
@@ -1,8 +1,9 @@
/**
* @file rtems/rtems/part.inl
* @file
*
* This file contains the macro implementation of all inlined routines
* in the Partition Manager.
* @ingroup ClassicPartImpl
*
* @brief Classic Partition Manager Implementation
*/
/* COPYRIGHT (c) 1989-2008.
@@ -13,20 +14,49 @@
* http://www.rtems.com/license/LICENSE.
*/
#ifndef _RTEMS_RTEMS_PART_H
# error "Never use <rtems/rtems/part.inl> directly; include <rtems/rtems/part.h> instead."
#endif
#ifndef _RTEMS_RTEMS_PART_INL
#define _RTEMS_RTEMS_PART_INL
#ifndef _RTEMS_RTEMS_PARTIMPL_H
#define _RTEMS_RTEMS_PARTIMPL_H
#include <rtems/rtems/part.h>
#include <rtems/score/chainimpl.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @addtogroup ClassicPart
* @{
* @defgroup ClassicPartImpl Classic Partition Manager Implementation
*
* @ingroup ClassicPart
*
* @{
*/
/**
* 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.
*
* Partition Manager -- Instantiate Data
*/
#ifndef RTEMS_PART_EXTERN
#define RTEMS_PART_EXTERN extern
#endif
/**
* The following defines the information control block used to
* manage this class of objects.
*/
RTEMS_PART_EXTERN Objects_Information _Partition_Information;
/**
* @brief Partition Manager Initialization
*
* This routine performs the initialization necessary for this manager.
*/
void _Partition_Manager_initialization(void);
/**
* @brief Allocate a buffer from the_partition.
*
@@ -173,5 +203,13 @@ RTEMS_INLINE_ROUTINE bool _Partition_Is_null (
/**@}*/
#ifdef __cplusplus
}
#endif
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/rtems/partmp.h>
#endif
#endif
/* end of include file */
+5 -3
View File
@@ -18,8 +18,8 @@
#ifndef _RTEMS_RTEMS_PARTMP_H
#define _RTEMS_RTEMS_PARTMP_H
#ifdef __cplusplus
extern "C" {
#ifndef _RTEMS_RTEMS_PARTIMPL_H
# error "Never use <rtems/rtems/partmp.h> directly; include <rtems/rtems/partimpl.h> instead."
#endif
#include <rtems/score/mppkt.h>
@@ -27,7 +27,9 @@ extern "C" {
#include <rtems/rtems/options.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/part.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup ClassicPartMP Partition MP Support
+4 -4
View File
@@ -115,6 +115,10 @@ $(PROJECT_INCLUDE)/rtems/rtems/part.h: include/rtems/rtems/part.h $(PROJECT_INCL
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/part.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/part.h
$(PROJECT_INCLUDE)/rtems/rtems/partimpl.h: include/rtems/rtems/partimpl.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/partimpl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/partimpl.h
$(PROJECT_INCLUDE)/rtems/rtems/ratemon.h: include/rtems/rtems/ratemon.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/ratemon.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/ratemon.h
@@ -217,10 +221,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/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
$(PROJECT_INCLUDE)/rtems/rtems/region.inl: inline/rtems/rtems/region.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/region.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/region.inl
+1 -1
View File
@@ -24,7 +24,7 @@
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/sysstate.h>
+1 -1
View File
@@ -23,7 +23,7 @@
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/sysstate.h>
+1 -2
View File
@@ -21,5 +21,4 @@
/* instantiate RTEMS partition data */
#define RTEMS_PART_EXTERN
#include <rtems/system.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
+1 -1
View File
@@ -23,7 +23,7 @@
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/sysstate.h>
+1 -1
View File
@@ -23,7 +23,7 @@
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/sysstate.h>
+1 -1
View File
@@ -23,7 +23,7 @@
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/sysstate.h>
+1 -1
View File
@@ -24,7 +24,7 @@
#include <rtems/score/mppkt.h>
#include <rtems/score/object.h>
#include <rtems/rtems/options.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/support.h>
+1 -1
View File
@@ -19,7 +19,7 @@
#include <rtems/rtems/support.h>
#include <rtems/score/address.h>
#include <rtems/score/object.h>
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/thread.h>
#include <rtems/score/sysstate.h>
+1 -1
View File
@@ -35,7 +35,7 @@
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/rtems/mp.h>
#endif
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/rtems/ratemonimpl.h>
#include <rtems/rtems/region.h>
#include <rtems/rtems/semimpl.h>
+2 -2
View File
@@ -33,7 +33,7 @@
#include <rtems/rtems/mp.h>
#include <rtems/score/mpci.h>
#endif
#include <rtems/rtems/part.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/score/priority.h>
#include <rtems/rtems/ratemonimpl.h>
#include <rtems/rtems/region.h>
@@ -334,7 +334,7 @@ uninitialized =
/*options.h*/ 0 +
/*part.h*/ (sizeof _Partition_Information) +
/*partimpl.h*/ (sizeof _Partition_Information) +
#if defined(RTEMS_MULTIPROCESSING)
/*partmp.h*/ 0 +