2011-08-02 Jennifer.Averett <Jennifer.Averett@OARcorp.com>

PR 1872
	* score/src/apimutexlock.c, score/src/apimutexunlock.c: Added smp
	support to apimutex.
This commit is contained in:
Jennifer Averett
2011-08-02 13:38:25 +00:00
parent d188381a6b
commit 6ef32a32b2
3 changed files with 14 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2011-08-02 Jennifer.Averett <Jennifer.Averett@OARcorp.com>
PR 1872
* score/src/apimutexlock.c, score/src/apimutexunlock.c: Added smp
support to apimutex.
2011-08-02 Petr Benes <benesp16@fel.cvut.cz>
PR 1861/cpukit

View File

@@ -22,6 +22,10 @@ void _API_Mutex_Lock(
{
ISR_Level level;
#if defined(RTEMS_SMP)
_Thread_Disable_dispatch();
#endif
_ISR_Disable( level );
_CORE_mutex_Seize(

View File

@@ -20,7 +20,10 @@ void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
_Thread_Disable_dispatch();
/* Dispatch is already disabled in SMP while lock is held. */
#if !defined(RTEMS_SMP)
_Thread_Disable_dispatch();
#endif
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,