From e8e914b3b13d60c47bd8ebf29d421cbcf8ff698a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Nov 2018 10:37:22 +0100 Subject: rtems: Move internal structures to regiondata.h Update #3598. --- cpukit/headers.am | 1 + cpukit/include/rtems/confdefs.h | 1 + cpukit/include/rtems/rtems/region.h | 35 ++------------------- cpukit/include/rtems/rtems/regiondata.h | 56 +++++++++++++++++++++++++++++++++ cpukit/include/rtems/rtems/regionimpl.h | 2 +- cpukit/libmisc/monitor/mon-region.c | 1 + 6 files changed, 63 insertions(+), 33 deletions(-) create mode 100644 cpukit/include/rtems/rtems/regiondata.h diff --git a/cpukit/headers.am b/cpukit/headers.am index a274647105..95bc817773 100644 --- a/cpukit/headers.am +++ b/cpukit/headers.am @@ -260,6 +260,7 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/ratemon.h include_rtems_rtems_HEADERS += include/rtems/rtems/ratemondata.h include_rtems_rtems_HEADERS += include/rtems/rtems/ratemonimpl.h include_rtems_rtems_HEADERS += include/rtems/rtems/region.h +include_rtems_rtems_HEADERS += include/rtems/rtems/regiondata.h include_rtems_rtems_HEADERS += include/rtems/rtems/regionimpl.h include_rtems_rtems_HEADERS += include/rtems/rtems/sem.h include_rtems_rtems_HEADERS += include/rtems/rtems/semimpl.h diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h index 4eed0d2cfc..7b2b47ae00 100644 --- a/cpukit/include/rtems/confdefs.h +++ b/cpukit/include/rtems/confdefs.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/cpukit/include/rtems/rtems/region.h b/cpukit/include/rtems/rtems/region.h index 4772e2835b..baa8a72806 100644 --- a/cpukit/include/rtems/rtems/region.h +++ b/cpukit/include/rtems/rtems/region.h @@ -1,22 +1,9 @@ /** - * @file rtems/rtems/region.h + * @file * - * @defgroup ClassicRegion Regions + * @ingroup ClassicRegion * - * @ingroup ClassicRTEMS - * @brief Region Manager - * - * This include file contains all the constants and structures associated - * with the Region Manager. This manager provides facilities to dynamically - * allocate memory in variable sized units which are returned as segments. - * - * Directives provided are: - * - * - create a region - * - get an ID of a region - * - delete a region - * - get a segment from a region - * - return a segment to a region + * @brief Classic Region Manager API */ /* COPYRIGHT (c) 1989-2013. @@ -34,8 +21,6 @@ #include #include #include -#include -#include #ifdef __cplusplus extern "C" { @@ -51,20 +36,6 @@ extern "C" { */ /**@{*/ -/** - * The following records define the control block used to manage - * each region. - */ - -typedef struct { - Objects_Control Object; - Thread_queue_Control Wait_queue; /* waiting threads */ - const Thread_queue_Operations *wait_operations; - uintptr_t maximum_segment_size; /* in bytes */ - rtems_attribute attribute_set; - Heap_Control Memory; -} Region_Control; - /** * @brief rtems_region_create * diff --git a/cpukit/include/rtems/rtems/regiondata.h b/cpukit/include/rtems/rtems/regiondata.h new file mode 100644 index 0000000000..75fc950691 --- /dev/null +++ b/cpukit/include/rtems/rtems/regiondata.h @@ -0,0 +1,56 @@ +/** + * @file + * + * @ingroup ClassicRegionImpl + * + * @brief Classic Region Manager Data Structures + */ + +/* COPYRIGHT (c) 1989-2013. + * 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_REGIONDATA_H +#define _RTEMS_RTEMS_REGIONDATA_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup ClassicRegionImpl + * + * @{ + */ + +/** + * The following records define the control block used to manage + * each region. + */ + +typedef struct { + Objects_Control Object; + Thread_queue_Control Wait_queue; /* waiting threads */ + const Thread_queue_Operations *wait_operations; + uintptr_t maximum_segment_size; /* in bytes */ + rtems_attribute attribute_set; + Heap_Control Memory; +} Region_Control; + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/include/rtems/rtems/regionimpl.h b/cpukit/include/rtems/rtems/regionimpl.h index 178b7ea32b..8a7ee258cc 100644 --- a/cpukit/include/rtems/rtems/regionimpl.h +++ b/cpukit/include/rtems/rtems/regionimpl.h @@ -17,7 +17,7 @@ #ifndef _RTEMS_RTEMS_REGIONIMPL_H #define _RTEMS_RTEMS_REGIONIMPL_H -#include +#include #include #include #include diff --git a/cpukit/libmisc/monitor/mon-region.c b/cpukit/libmisc/monitor/mon-region.c index 023ada77cf..ece6a6a788 100644 --- a/cpukit/libmisc/monitor/mon-region.c +++ b/cpukit/libmisc/monitor/mon-region.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include /* memcpy() */ -- cgit v1.2.3