summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/apimutexlock.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-09 21:52:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-11-09 21:52:09 +0000
commit17b73dc766910526c59923f9afcfa11aca4fd548 (patch)
treeebc50b79f7b71b898857bbda82e7311224d51425 /cpukit/score/src/apimutexlock.c
parent2007-11-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-17b73dc766910526c59923f9afcfa11aca4fd548.tar.bz2
2007-11-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/apimutexlock.c, score/src/apimutexunlock.c: Functions were in opposite files. Whoops!
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
+ );
}