[rtems commit] score: Fix _API_Mutex_Is_locked()
Sebastian Huber
sebh at rtems.org
Thu Apr 16 09:37:35 UTC 2015
Module: rtems
Branch: master
Commit: 72e846d534509386634f316919124519d7718c38
Changeset: http://git.rtems.org/rtems/commit/?id=72e846d534509386634f316919124519d7718c38
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Apr 16 11:32:16 2015 +0200
score: Fix _API_Mutex_Is_locked()
Remove superfluous ISR disable/enable. In addition using a stand-alone
_ISR_Disable/Enable is wrong on SMP configurations.
---
cpukit/score/src/apimutexislocked.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/cpukit/score/src/apimutexislocked.c b/cpukit/score/src/apimutexislocked.c
index 739bc3f..1bd811a 100644
--- a/cpukit/score/src/apimutexislocked.c
+++ b/cpukit/score/src/apimutexislocked.c
@@ -21,16 +21,8 @@
#include <rtems/score/apimutex.h>
#include <rtems/score/coremuteximpl.h>
-#include <rtems/score/threadimpl.h>
bool _API_Mutex_Is_locked( API_Mutex_Control *the_mutex )
{
- bool is_locked;
- ISR_Level level;
-
- _ISR_Disable( level );
- is_locked = _CORE_mutex_Is_locked( &the_mutex->Mutex );
- _ISR_Enable( level );
-
- return is_locked;
+ return _CORE_mutex_Is_locked( &the_mutex->Mutex );
}
More information about the vc
mailing list