diff options
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/coremutex.h | 18 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/interr.h | 3 |
2 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 f78232a0fb..5f6627f932 100644 --- a/cpukit/score/include/rtems/score/coremutex.h +++ b/cpukit/score/include/rtems/score/coremutex.h @@ -354,7 +354,8 @@ void _CORE_mutex_Seize_interrupt_blocking( * * If the caller is willing to wait * then they are blocked. */ -#define _CORE_mutex_Seize( \ + +#define _CORE_mutex_Seize_body( \ _the_mutex, _id, _wait, _timeout, _level ) \ do { \ if ( _Thread_Dispatch_disable_level \ @@ -364,7 +365,8 @@ void _CORE_mutex_Seize_interrupt_blocking( _Internal_error_Occurred( \ INTERNAL_ERROR_CORE, \ FALSE, \ - 18 /* called from wrong environment */); \ + INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE \ + ); \ } \ if ( _CORE_mutex_Seize_interrupt_trylock( _the_mutex, &_level ) ) { \ if ( !_wait ) { \ @@ -382,6 +384,18 @@ void _CORE_mutex_Seize_interrupt_blocking( } \ } while (0) +#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) + void _CORE_mutex_Seize( + CORE_mutex_Control *_the_mutex, + Objects_Id _id, + boolean _wait, + Watchdog_Interval _timeout, + ISR_Level _level + ); +#else + #define _CORE_mutex_Seize( _the_mutex, _id, _wait, _timeout, _level ) \ + _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ) +#endif /** * @brief Surrender the Mutex * diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index a8792c334b..5666ddfb7e 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -64,7 +64,8 @@ typedef enum { INTERNAL_ERROR_BAD_STACK_HOOK, INTERNAL_ERROR_BAD_ATTRIBUTES, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY, - INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL + INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL, + INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE } Internal_errors_Core_list; /** |