summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coremutex.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-21 15:57:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-21 15:57:22 +0000
commite2ba62d1ea181d8057c6c3f6ba2e9dc651f6aa3a (patch)
tree3ba6fcde8d360aa8552a7667159b04f67051c27b /cpukit/score/include/rtems/score/coremutex.h
parent2007-12-21 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-e2ba62d1ea181d8057c6c3f6ba2e9dc651f6aa3a.tar.bz2
2007-12-21 Joel Sherrill <joel.sherrill@OARcorp.com>
* configure.ac, score/include/rtems/score/coremutex.h, score/inline/rtems/score/coremutex.inl: Add the ability to disable inlining coremutex seize. This reduces the code size and also improves the process of coverage analysis. * score/src/coremutexseizeintr.c: New file.
Diffstat (limited to 'cpukit/score/include/rtems/score/coremutex.h')
-rw-r--r--cpukit/score/include/rtems/score/coremutex.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h
index b61c8476e4..59a6b6f1f9 100644
--- a/cpukit/score/include/rtems/score/coremutex.h
+++ b/cpukit/score/include/rtems/score/coremutex.h
@@ -41,6 +41,7 @@ extern "C" {
#include <rtems/score/interr.h>
#include <rtems/score/sysstate.h>
+
/**
* @brief MP Support Callback Prototype
*
@@ -102,16 +103,19 @@ typedef enum {
* because the resource never became available.
*/
CORE_MUTEX_TIMEOUT,
+
#ifdef __STRICT_ORDER_MUTEX__
/** This status indicates that a thread not release the mutex which has
* the priority inheritance property in a right order.
*/
CORE_MUTEX_RELEASE_NOT_ORDER,
#endif
+
/** This status indicates that a thread of logically greater importance
* than the ceiling priority attempted to lock this mutex.
*/
CORE_MUTEX_STATUS_CEILING_VIOLATED,
+
} CORE_mutex_Status;
/**
@@ -190,7 +194,7 @@ typedef struct {
} CORE_mutex_Attributes;
#ifdef __STRICT_ORDER_MUTEX__
-/*@brief Core Mutex Lock_Chain Struct
+/*@beief Core Mutex Lock_Chain Struct
*
* The following defines the control block used to manage lock chain of
* priority inheritance mutex.
@@ -239,7 +243,7 @@ typedef struct {
/** This element contains the object Id of the holding thread. */
Objects_Id holder_id;
#ifdef __STRICT_ORDER_MUTEX__
- /** This field is used to manipulate the priority inheritance mutex queue. */
+ /** This field is used to manipulate the priority inheritance mutex queue*/
CORE_mutex_order_list queue;
#endif
@@ -281,11 +285,22 @@ void _CORE_mutex_Initialize(
* @note For performance reasons, this routine is implemented as
* a macro that uses two support routines.
*/
-int _CORE_mutex_Seize_interrupt_trylock(
+
+RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
);
+#if !defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
+ #define _CORE_mutex_Seize_interrupt_trylock( _mutex, _level ) \
+ _CORE_mutex_Seize_interrupt_trylock_body( _mutex, _level )
+#else
+ int _CORE_mutex_Seize_interrupt_trylock(
+ CORE_mutex_Control *the_mutex,
+ ISR_Level *level_p
+ );
+#endif
+
/**
* @brief Seize Mutex with Blocking
*