diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-23 14:38:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-23 15:12:55 +0200 |
commit | f6c7c57d86b58e12d372495a23e331cb81ea59ff (patch) | |
tree | 6406542e0324f94964bbce0e41d2f86c637d5f1f /cpukit/rtems/inline/rtems/rtems/region.inl | |
parent | rtems: Include <rtems/debug.h> in <rtems.h> (diff) | |
download | rtems-f6c7c57d86b58e12d372495a23e331cb81ea59ff.tar.bz2 |
rtems: Create region implementation header
Move implementation specific parts of region.h and region.inl into new
header file regionimpl.h. The region.h contains now only the
application visible API.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/regionimpl.h (renamed from cpukit/rtems/inline/rtems/rtems/region.inl) | 96 |
1 files changed, 83 insertions, 13 deletions
diff --git a/cpukit/rtems/inline/rtems/rtems/region.inl b/cpukit/rtems/include/rtems/rtems/regionimpl.h index 30e482cdc0..ad2cacb5f2 100644 --- a/cpukit/rtems/inline/rtems/rtems/region.inl +++ b/cpukit/rtems/include/rtems/rtems/regionimpl.h @@ -1,13 +1,9 @@ /** - * @file rtems/rtems/region.inl + * @file * - * @addtogroup ClassicRegion + * @ingroup ClassicRegionImpl * - * @ingroup ClassicRTEMS - * @brief Macro Implementation from Region Manager - * - * This file contains the macro implementation of the inlined - * routines from the Region Manager. + * @brief Classic Region Manager Implementation */ /* COPYRIGHT (c) 1989-2008. @@ -18,17 +14,52 @@ * http://www.rtems.com/license/LICENSE. */ -#ifndef _RTEMS_RTEMS_REGION_H -# error "Never use <rtems/rtems/region.inl> directly; include <rtems/rtems/region.h> instead." +#ifndef _RTEMS_RTEMS_REGIONIMPL_H +#define _RTEMS_RTEMS_REGIONIMPL_H + +#include <rtems/rtems/region.h> +#include <rtems/debug.h> + +#ifdef __cplusplus +extern "C" { #endif -#ifndef _RTEMS_RTEMS_REGION_INL -#define _RTEMS_RTEMS_REGION_INL +/** + * @defgroup ClassicRegionImpl Classic Region Manager Implementation + * + * @ingroup ClassicRegion + * + * @{ + */ /** - * @addtogroup ClassicRegion - * @{ + * @brief Instantiate RTEMS Region Data + * + * Region Manager -- Instantiate Data + * + * 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_REGION_EXTERN +#define RTEMS_REGION_EXTERN extern +#endif + +/** + * The following defines the information control block used to + * manage this class of objects. + */ +RTEMS_REGION_EXTERN Objects_Information _Region_Information; + +/** + * @brief _Region_Manager_initialization + * + * Region Manager + * + * This routine performs the initialization necessary for this manager. + */ +void _Region_Manager_initialization(void); /** * @brief Region_Allocate @@ -112,7 +143,46 @@ RTEMS_INLINE_ROUTINE bool _Region_Is_null ( return ( the_region == NULL ); } +/** + * @brief Process Region Queue + * + * This is a helper routine which is invoked any time memory is + * freed. It looks at the set of waiting tasks and attempts to + * satisfy all outstanding requests. + * + * @param[in] the_region is the the region + */ +extern void _Region_Process_queue(Region_Control *the_region); + +/** + * @brief _Region_Debug_Walk + * + * This routine is invoked to verify the integrity of a heap associated + * with the_region. + */ +#ifdef RTEMS_DEBUG + +#define _Region_Debug_Walk( _the_region, _source ) \ + do { \ + if ( rtems_debug_is_enabled( RTEMS_DEBUG_REGION ) ) \ + _Heap_Walk( &(_the_region)->Memory, _source, false ); \ + } while ( 0 ) + +#else + +#define _Region_Debug_Walk( _the_region, _source ) + +#endif + /**@}*/ +#ifdef __cplusplus +} +#endif + +#if defined(RTEMS_MULTIPROCESSING) +#include <rtems/rtems/regionmp.h> +#endif + #endif /* end of include file */ |