summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/apimutexlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/apimutexlock.c')
-rw-r--r--cpukit/score/src/apimutexlock.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/cpukit/score/src/apimutexlock.c b/cpukit/score/src/apimutexlock.c
index ca824a6e6c..3618af1d8a 100644
--- a/cpukit/score/src/apimutexlock.c
+++ b/cpukit/score/src/apimutexlock.c
@@ -16,15 +16,19 @@
#include <rtems/system.h>
#include <rtems/score/apimutex.h>
-void _API_Mutex_Unlock(
+void _API_Mutex_Lock(
API_Mutex_Control *the_mutex
)
{
- _Thread_Disable_dispatch();
- _CORE_mutex_Surrender(
- &the_mutex->Mutex,
- the_mutex->Object.id,
- NULL
- );
- _Thread_Enable_dispatch();
+ ISR_Level level;
+
+ _ISR_Disable( level );
+
+ _CORE_mutex_Seize(
+ &the_mutex->Mutex,
+ the_mutex->Object.id,
+ TRUE,
+ 0,
+ level
+ );
}