summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/region.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-04-18 15:02:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-04-18 15:02:20 +0000
commit067a96ad0c3b0818d71d9aaadaee4b520d940de1 (patch)
treed04eed432a0534ebfb0830d6f7e49ce78ff098a4 /cpukit/rtems/include/rtems/rtems/region.h
parent2008-04-18 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-067a96ad0c3b0818d71d9aaadaee4b520d940de1.tar.bz2
2008-04-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/barriermp.h, rtems/include/rtems/rtems/cache.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/event.h, rtems/include/rtems/rtems/eventmp.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/mp.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/partmp.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/semmp.h, rtems/include/rtems/rtems/signal.h, rtems/include/rtems/rtems/signalmp.h, rtems/include/rtems/rtems/status.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/include/rtems/rtems/types.h, rtems/inline/rtems/rtems/asr.inl, rtems/inline/rtems/rtems/attr.inl, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/dpmem.inl, rtems/inline/rtems/rtems/event.inl, rtems/inline/rtems/rtems/eventset.inl, rtems/inline/rtems/rtems/message.inl, rtems/inline/rtems/rtems/modes.inl, rtems/inline/rtems/rtems/options.inl, rtems/inline/rtems/rtems/part.inl, rtems/inline/rtems/rtems/ratemon.inl, rtems/inline/rtems/rtems/region.inl, rtems/inline/rtems/rtems/sem.inl, rtems/inline/rtems/rtems/status.inl, rtems/inline/rtems/rtems/support.inl, rtems/inline/rtems/rtems/tasks.inl, rtems/inline/rtems/rtems/timer.inl: Initial conversion of Classic API header files to Doxygen. * rtems/Doxyfile: New file.
Diffstat (limited to '')
-rw-r--r--cpukit/rtems/include/rtems/rtems/region.h142
1 files changed, 61 insertions, 81 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h
index 78cd7796a9..aff2648265 100644
--- a/cpukit/rtems/include/rtems/rtems/region.h
+++ b/cpukit/rtems/include/rtems/rtems/region.h
@@ -1,21 +1,20 @@
/**
* @file rtems/rtems/region.h
- */
-
-/*
+ *
* 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
- *
- * COPYRIGHT (c) 1989-2007.
+ * - create a region
+ * - get an ID of a region
+ * - delete a region
+ * - get a segment from a region
+ * - return a segment to a region
+ */
+
+/* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -28,14 +27,6 @@
#ifndef _RTEMS_RTEMS_REGION_H
#define _RTEMS_RTEMS_REGION_H
-#ifndef RTEMS_REGION_EXTERN
-#define RTEMS_REGION_EXTERN extern
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include <stddef.h>
#include <rtems/score/object.h>
@@ -48,7 +39,22 @@ extern "C" {
#include <rtems/rtems/support.h>
#include <rtems/rtems/types.h>
-/*
+/**
+ * @defgroup ClassicRegion Classic API Region
+ *
+ * This encapsulates functionality which XXX
+ */
+/**@{*/
+
+#ifndef RTEMS_REGION_EXTERN
+#define RTEMS_REGION_EXTERN extern
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
* The following records define the control block used to manage
* each region.
*/
@@ -65,29 +71,23 @@ typedef struct {
Heap_Control Memory;
} Region_Control;
-/*
+/**
* The following defines the information control block used to
* manage this class of objects.
*/
-
RTEMS_REGION_EXTERN Objects_Information _Region_Information;
-/*
- * _Region_Manager_initialization
- *
- * DESCRIPTION:
+/**
+ * @brief _Region_Manager_initialization
*
* This routine performs the initialization necessary for this manager.
*/
-
void _Region_Manager_initialization(
uint32_t maximum_regions
);
-/*
- * rtems_region_create
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_create
*
* This routine implements the rtems_region_create directive. The
* region will have the name name. The memory area managed by
@@ -97,7 +97,6 @@ void _Region_Manager_initialization(
* thread queue discipline is used by the region. It returns the
* id of the created region in ID.
*/
-
rtems_status_code rtems_region_create(
rtems_name name,
void *starting_address,
@@ -107,86 +106,69 @@ rtems_status_code rtems_region_create(
Objects_Id *id
);
-/*
- * rtems_region_extend
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_extend
*
* This routine implements the rtems_region_extend directive. The
* region will have the name name. The memory area managed by
* the region will be attempted to be grown by length bytes using
* the memory starting at starting_address.
*/
-
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
);
-/*
- * rtems_region_ident
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_ident
*
* This routine implements the rtems_region_ident directive.
* This directive returns the region ID associated with name.
* If more than one region is named name, then the region
* to which the ID belongs is arbitrary.
*/
-
rtems_status_code rtems_region_ident(
rtems_name name,
Objects_Id *id
);
-/*
- * rtems_region_get_information
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_get_information
*
* This routine implements the rtems_region_get_information directive.
* This directive returns information about the heap associated with
* this region.
*/
-
rtems_status_code rtems_region_get_information(
Objects_Id id,
Heap_Information_block *the_info
);
-/*
- * rtems_region_get_free_information
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_get_free_information
*
* This routine implements the rtems_region_get_free_information directive.
* This directive returns information about the free blocks in the
* heap associated with this region.
*/
-
rtems_status_code rtems_region_get_free_information(
Objects_Id id,
Heap_Information_block *the_info
);
-/*
- * rtems_region_delete
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_delete
*
* This routine implements the rtems_region_delete directive. The
* region indicated by ID is deleted.
*/
-
rtems_status_code rtems_region_delete(
Objects_Id id
);
-/*
- * rtems_region_get_segment
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_get_segment
*
* This routine implements the rtems_region_get_segment directive. It
* attempts to allocate a segment from the region associated with ID.
@@ -196,7 +178,6 @@ rtems_status_code rtems_region_delete(
* timeout of timeout clock ticks. Whether the task blocks or returns
* immediately is based on the no_wait option in the option_set.
*/
-
rtems_status_code rtems_region_get_segment(
Objects_Id id,
uint32_t size,
@@ -205,25 +186,20 @@ rtems_status_code rtems_region_get_segment(
void **segment
);
-/*
- * rtems_region_get_segment_size
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_get_segment_size
*
* This routine implements the rtems_region_get_segment_size directive. It
* returns the size in bytes of the specified user memory area.
*/
-
rtems_status_code rtems_region_get_segment_size(
Objects_Id id,
void *segment,
size_t *size
);
-/*
- * rtems_region_return_segment
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_return_segment
*
* This routine implements the rtems_region_return_segment directive. It
* frees the segment to the region associated with ID. The segment must
@@ -233,16 +209,13 @@ rtems_status_code rtems_region_get_segment_size(
* many subsequent tasks as possible will be unblocked with their requests
* satisfied.
*/
-
rtems_status_code rtems_region_return_segment(
Objects_Id id,
void *segment
);
-/*
- * rtems_region_resize_segment
- *
- * DESCRIPTION:
+/**
+ * @brief rtems_region_resize_segment
*
* This routine implements the rtems_region_resize_segment directive. It
* tries to resize segment in the region associated with 'id' to the new size
@@ -261,7 +234,6 @@ rtems_status_code rtems_region_return_segment(
* 'old_size' the old size in bytes of the user memory area of the specified
* segment.
*/
-
rtems_status_code rtems_region_resize_segment(
Objects_Id id,
void *segment,
@@ -271,21 +243,27 @@ rtems_status_code rtems_region_resize_segment(
#ifndef __RTEMS_APPLICATION__
#include <rtems/rtems/region.inl>
+/**
+ * @brief Region_Process_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.
+ */
extern void _Region_Process_queue(Region_Control *the_region);
+
#endif
+
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/rtems/regionmp.h>
#endif
-/*
- * _Region_Debug_Walk
- *
- * DESCRIPTION:
+/**
+ * @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 ) \
@@ -304,5 +282,7 @@ extern void _Region_Process_queue(Region_Control *the_region);
}
#endif
+/**@}*/
+
#endif
/* end of include file */