mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
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 parent
d188381a6b
commit
6ef32a32b2
3 files changed
+14
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user