diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-09 21:11:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-09 21:11:04 +0000 |
commit | 8daaa215567c4016b24c8e0c7b019b15b0e907e2 (patch) | |
tree | b973b5f21e377b995fa9e3d01affc422e4506454 /cpukit/score/include/rtems/score | |
parent | 2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-8daaa215567c4016b24c8e0c7b019b15b0e907e2.tar.bz2 |
2008-01-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/coremutex.h,
score/src/coremutexseizeintr.c: Fix conditional code for inlining
_CORE_mutex_Seize_interrupt_trylock() and add comments.
Diffstat (limited to 'cpukit/score/include/rtems/score')
-rw-r--r-- | cpukit/score/include/rtems/score/coremutex.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h index 59a6b6f1f9..f78232a0fb 100644 --- a/cpukit/score/include/rtems/score/coremutex.h +++ b/cpukit/score/include/rtems/score/coremutex.h @@ -291,14 +291,24 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body( 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 +#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) + /* + * When doing test coverage analysis or trying to minimize the code + * space for RTEMS, it is often helpful to not inline this method + * multiple times. It is fairly large and has a high branch complexity + * which makes it harder to get full binary test coverage. + */ int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ); +#else + /* + * The default is to favor speed and inlining this definitely saves + * a few instructions. This is very important for mutex performance. + */ + #define _CORE_mutex_Seize_interrupt_trylock( _mutex, _level ) \ + _CORE_mutex_Seize_interrupt_trylock_body( _mutex, _level ) #endif /** |