From f00c5c6e347f72d272545ba71b4b22ae45b6d113 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Nov 2018 10:32:14 +0100 Subject: rtems: Move internal structures to partdata.h Update #3598. --- cpukit/headers.am | 1 + cpukit/include/rtems/confdefs.h | 1 + cpukit/include/rtems/rtems/part.h | 43 ++---------------------- cpukit/include/rtems/rtems/partdata.h | 63 +++++++++++++++++++++++++++++++++++ cpukit/include/rtems/rtems/partimpl.h | 2 +- cpukit/libmisc/monitor/mon-part.c | 1 + 6 files changed, 70 insertions(+), 41 deletions(-) create mode 100644 cpukit/include/rtems/rtems/partdata.h diff --git a/cpukit/headers.am b/cpukit/headers.am index cd0abfabec..a274647105 100644 --- a/cpukit/headers.am +++ b/cpukit/headers.am @@ -253,6 +253,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/partdata.h include_rtems_rtems_HEADERS += include/rtems/rtems/partimpl.h include_rtems_rtems_HEADERS += include/rtems/rtems/partmp.h include_rtems_rtems_HEADERS += include/rtems/rtems/ratemon.h diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index 713064f6af..4eed0d2cfc 100644 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/cpukit/include/rtems/rtems/part.h b/cpukit/include/rtems/rtems/part.h index 769f3c6904..7208f88e6b 100644 --- a/cpukit/include/rtems/rtems/part.h +++ b/cpukit/include/rtems/rtems/part.h @@ -1,23 +1,9 @@ /** - * @file rtems/rtems/part.h + * @file * - * @defgroup ClassicPart Partitions + * @ingroup ClassicPart * - * @ingroup ClassicRTEMS - * @brief Partition Manager - * - * This include file contains all the constants and structures associated - * with the Partition Manager. This manager provides facilities to - * dynamically allocate memory in fixed-sized units which are returned - * as buffers. - * - * Directives provided are: - * - * - create a partition - * - get an ID of a partition - * - delete a partition - * - get a buffer from a partition - * - return a buffer to a partition + * @brief Classic Partition Manager API */ /* COPYRIGHT (c) 1989-2008. @@ -34,7 +20,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" { @@ -50,28 +35,6 @@ extern "C" { */ /**@{*/ -/** - * The following defines the control block used to manage each partition. - */ -typedef struct { - /** This field is the object management portion of a Partition instance. */ - Objects_Control Object; - /** This field is the lock of the Partition. */ - ISR_LOCK_MEMBER( Lock ) - /** This field is the physical starting address of the Partition. */ - void *starting_address; - /** This field is the size of the Partition in bytes. */ - uintptr_t length; - /** This field is the size of each buffer in bytes */ - size_t buffer_size; - /** This field is the attribute set provided at create time. */ - rtems_attribute attribute_set; - /** This field is the of allocated buffers. */ - uintptr_t number_of_used_blocks; - /** This field is the chain used to manage unallocated buffers. */ - Chain_Control Memory; -} Partition_Control; - /** * @brief RTEMS Partition Create * diff --git a/cpukit/include/rtems/rtems/partdata.h b/cpukit/include/rtems/rtems/partdata.h new file mode 100644 index 0000000000..4423de09f7 --- /dev/null +++ b/cpukit/include/rtems/rtems/partdata.h @@ -0,0 +1,63 @@ +/** + * @file + * + * @ingroup ClassicPartImpl + * + * @brief Classic Partition Manager Data Structures + */ + +/* COPYRIGHT (c) 1989-2008. + * 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_RTEMS_PARTDATA_H +#define _RTEMS_RTEMS_PARTDATA_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup ClassicPartImpl + * + * @{ + */ + +/** + * The following defines the control block used to manage each partition. + */ +typedef struct { + /** This field is the object management portion of a Partition instance. */ + Objects_Control Object; + /** This field is the lock of the Partition. */ + ISR_LOCK_MEMBER( Lock ) + /** This field is the physical starting address of the Partition. */ + void *starting_address; + /** This field is the size of the Partition in bytes. */ + uintptr_t length; + /** This field is the size of each buffer in bytes */ + size_t buffer_size; + /** This field is the attribute set provided at create time. */ + rtems_attribute attribute_set; + /** This field is the of allocated buffers. */ + uintptr_t number_of_used_blocks; + /** This field is the chain used to manage unallocated buffers. */ + Chain_Control Memory; +} Partition_Control; + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/include/rtems/rtems/partimpl.h b/cpukit/include/rtems/rtems/partimpl.h index 02d3ff8b44..d795748723 100644 --- a/cpukit/include/rtems/rtems/partimpl.h +++ b/cpukit/include/rtems/rtems/partimpl.h @@ -17,7 +17,7 @@ #ifndef _RTEMS_RTEMS_PARTIMPL_H #define _RTEMS_RTEMS_PARTIMPL_H -#include +#include #include #include diff --git a/cpukit/libmisc/monitor/mon-part.c b/cpukit/libmisc/monitor/mon-part.c index b428f9e868..18034cd58f 100644 --- a/cpukit/libmisc/monitor/mon-part.c +++ b/cpukit/libmisc/monitor/mon-part.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include /* memcpy() */ -- cgit v1.2.3