forked from Imagelibrary/rtems
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:
@@ -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>
|
2011-08-02 Petr Benes <benesp16@fel.cvut.cz>
|
||||||
|
|
||||||
PR 1861/cpukit
|
PR 1861/cpukit
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ void _API_Mutex_Lock(
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
|
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
_Thread_Disable_dispatch();
|
||||||
|
#endif
|
||||||
|
|
||||||
_ISR_Disable( level );
|
_ISR_Disable( level );
|
||||||
|
|
||||||
_CORE_mutex_Seize(
|
_CORE_mutex_Seize(
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ void _API_Mutex_Unlock(
|
|||||||
API_Mutex_Control *the_mutex
|
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(
|
_CORE_mutex_Surrender(
|
||||||
&the_mutex->Mutex,
|
&the_mutex->Mutex,
|
||||||
the_mutex->Object.id,
|
the_mutex->Object.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user