diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 15:13:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 16:57:27 +0200 |
commit | 2a3cff89af9dd781a7cb403cd4a8d6a218784144 (patch) | |
tree | f7ac1584ef2e0409f20a409560f5d5b91d570497 | |
parent | posix: Protect ualarm() (diff) | |
download | rtems-2a3cff89af9dd781a7cb403cd4a8d6a218784144.tar.bz2 |
score: _CORE_mutex_Check_dispatch_for_seize()
Add SMP version of this check, otherwise sptests/spfatal03 fails.
-rw-r--r-- | 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 5a139556ca..337ef01bc1 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() \ |