summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/apimutex.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-06 15:24:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-09-06 15:24:08 +0000
commitdea3eccb38b556b04552219e00b7abd656587278 (patch)
tree6affcb3026172273e366ee15ed3e8ec70f023a20 /cpukit/score/include/rtems/score/apimutex.h
parentRegenerate. (diff)
downloadrtems-dea3eccb38b556b04552219e00b7abd656587278.tar.bz2
2009-09-06 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* libcsupport/src/free.c, libmisc/stackchk/check.c, rtems/include/rtems/rtems/region.h, rtems/src/regioncreate.c, rtems/src/regionextend.c, rtems/src/regiongetinfo.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionresizesegment.c, score/src/pheapallocate.c, score/src/pheapallocatealigned.c, score/src/pheapextend.c, score/src/pheapfree.c, score/src/pheapgetblocksize.c, score/src/pheapgetfreeinfo.c, score/src/pheapgetinfo.c, score/src/pheapgetsize.c, score/src/pheapinit.c, score/src/pheapresizeblock.c, score/src/pheapwalk.c: Update for heap API changes. * score/include/rtems/score/apimutex.h, score/include/rtems/score/object.h: Documentation. * score/include/rtems/score/heap.h, score/include/rtems/score/protectedheap.h, score/inline/rtems/score/heap.inl, score/src/heap.c, score/src/heapallocate.c, score/src/heapallocatealigned.c, score/src/heapextend.c, score/src/heapfree.c, score/src/heapgetfreeinfo.c, score/src/heapgetinfo.c, score/src/heapresizeblock.c, score/src/heapsizeofuserarea.c, score/src/heapwalk.c: Overall cleanup. Added boundary constraint to allocation function. More changes follow.
Diffstat (limited to 'cpukit/score/include/rtems/score/apimutex.h')
-rw-r--r--cpukit/score/include/rtems/score/apimutex.h124
1 files changed, 53 insertions, 71 deletions
diff --git a/cpukit/score/include/rtems/score/apimutex.h b/cpukit/score/include/rtems/score/apimutex.h
index a0ff68b8d6..0288fd9367 100644
--- a/cpukit/score/include/rtems/score/apimutex.h
+++ b/cpukit/score/include/rtems/score/apimutex.h
@@ -1,9 +1,9 @@
/**
- * @file rtems/score/apimutex.h
+ * @file
*
- * This include file contains all the constants and structures associated
- * with the API Mutex Handler. This handler is used by API level
- * routines to manage mutual exclusion.
+ * @ingroup ScoreAPIMutex
+ *
+ * @brief API Mutex Handler API.
*/
/*
@@ -20,115 +20,97 @@
#ifndef _RTEMS_SCORE_APIMUTEX_H
#define _RTEMS_SCORE_APIMUTEX_H
-/**
- * @defgroup ScoreAPIMutex API Mutex Handler
- *
- * This handler encapsulates functionality which provides mutexes to be used
- * in the implementation of API functionality.
- */
-/**@{*/
-
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @defgroup ScoreAPIMutex API Mutex Handler
+ *
+ * @ingroup Score
+ *
+ * @brief Provides routines to ensure mutual exclusion on API level.
+ *
+ * @{
+ */
+
#include <rtems/score/coremutex.h>
#include <rtems/score/isr.h>
#include <rtems/score/object.h>
/**
- * The following defines the control block used to manage each API mutex.
- * An API Mutex is an aggregration of an Object and a SuperCore Mutex.
+ * @brief Control block used to manage each API mutex.
*/
typedef struct {
- /** This field allows each API Mutex to be a full-fledged RTEMS object. */
- Objects_Control Object;
- /** This field contains the SuperCore mutex information. */
- CORE_mutex_Control Mutex;
-} API_Mutex_Control;
+ /**
+ * @brief Allows each API Mutex to be a full-fledged RTEMS object.
+ */
+ Objects_Control Object;
-/**
- * The following variable is the information control block used to manage
- * this class of objects.
- */
-SCORE_EXTERN Objects_Information _API_Mutex_Information;
+ /**
+ * Contains the SuperCore mutex information.
+ */
+ CORE_mutex_Control Mutex;
+} API_Mutex_Control;
/**
- * This routine performs the initialization necessary for this handler.
- *
- * @param[in] maximum_mutexes is the maximum number of API mutexes
- * that may exist at any time
+ * @brief Information control block used to manage this class of objects.
*/
-void _API_Mutex_Initialization(
- uint32_t maximum_mutexes
-);
+SCORE_EXTERN Objects_Information _API_Mutex_Information;
/**
- * This routine allocates an API mutex from the inactive set.
+ * @brief Performs the initialization necessary for this handler.
*
- * @param[out] the_mutex will contain the allocated mutex.
+ * The value @a maximum_mutexes is the maximum number of API mutexes that may
+ * exist at any time.
*/
-void _API_Mutex_Allocate(
- API_Mutex_Control **the_mutex
-);
+void _API_Mutex_Initialization( uint32_t maximum_mutexes );
/**
- * This routine acquires the specified API mutex.
- *
- * @param[in] the_mutex is the mutex to acquire.
+ * @brief Allocates an API mutex from the inactive set and returns it in
+ * @a mutex.
*/
-void _API_Mutex_Lock(
- API_Mutex_Control *the_mutex
-);
+void _API_Mutex_Allocate( API_Mutex_Control **mutex );
/**
- * This routine releases the specified API mutex.
- *
- * @param[in] the_mutex is the mutex to release.
+ * @brief Acquires the specified API mutex @a mutex.
*/
-void _API_Mutex_Unlock(
- API_Mutex_Control *the_mutex
-);
+void _API_Mutex_Lock( API_Mutex_Control *mutex );
/**
- * This variable points to the API Mutex instance that is used
- * to protect all memory allocation and deallocation in RTEMS.
- *
- * @note When the APIs all use this for allocation and deallocation
- * protection, then this possibly should be renamed and moved to a
- * higher level in the hierarchy.
+ * @brief Releases the specified API mutex @a mutex.
*/
-SCORE_EXTERN API_Mutex_Control *_RTEMS_Allocator_Mutex;
+void _API_Mutex_Unlock( API_Mutex_Control *mutex );
+
+/** @} */
/**
- * This macro locks the RTEMS Allocation Mutex.
+ * @defgroup ScoreAllocatorMutex RTEMS Allocator Mutex
+ *
+ * @ingroup ScoreAPIMutex
+ *
+ * @brief Protection for all memory allocations and deallocations in RTEMS.
*
- * @see _RTEMS_Allocator_Mutex
+ * When the APIs all use this for allocation and deallocation protection, then
+ * this possibly should be renamed and moved to a higher level in the
+ * hierarchy.
+ *
+ * @{
*/
+
+SCORE_EXTERN API_Mutex_Control *_RTEMS_Allocator_Mutex;
+
#define _RTEMS_Lock_allocator() \
_API_Mutex_Lock( _RTEMS_Allocator_Mutex )
-/**
- * This macro unlocks the RTEMS Allocation Mutex.
- *
- * @see _RTEMS_Allocator_Mutex
- */
#define _RTEMS_Unlock_allocator() \
_API_Mutex_Unlock( _RTEMS_Allocator_Mutex )
-/*
- * There are no inlines for this handler.
- */
-
-#ifndef __RTEMS_APPLICATION__
-/* #include <rtems/score/apimutex.inl> */
-#endif
+/** @} */
#ifdef __cplusplus
}
#endif
-/*!@}*/
-
#endif
/* end of include file */