[rtems commit] score: _CORE_mutex_Check_dispatch_for_seize()
Sebastian Huber
sebh at rtems.org
Mon Jul 22 14:51:44 UTC 2013
Module: rtems
Branch: master
Commit: 2a3cff89af9dd781a7cb403cd4a8d6a218784144
Changeset: http://git.rtems.org/rtems/commit/?id=2a3cff89af9dd781a7cb403cd4a8d6a218784144
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Jul 22 15:13:29 2013 +0200
score: _CORE_mutex_Check_dispatch_for_seize()
Add SMP version of this check, otherwise sptests/spfatal03 fails.
---
cpukit/score/include/rtems/score/coremuteximpl.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h
index 5a13955..337ef01 100644
--- a/cpukit/score/include/rtems/score/coremuteximpl.h
+++ b/cpukit/score/include/rtems/score/coremuteximpl.h
@@ -208,7 +208,10 @@ void _CORE_mutex_Seize_interrupt_blocking(
* @retval this method returns true if dispatch is in an unsafe state.
*/
#ifdef RTEMS_SMP
- #define _CORE_mutex_Check_dispatch_for_seize(_wait) 0
+ #define _CORE_mutex_Check_dispatch_for_seize(_wait) \
+ (_Thread_Dispatch_get_disable_level() != 1 \
+ && (_wait) \
+ && (_System_state_Get() >= SYSTEM_STATE_BEGIN_MULTITASKING))
#else
#define _CORE_mutex_Check_dispatch_for_seize(_wait) \
(!_Thread_Dispatch_is_enabled() \
More information about the vc
mailing list