From 17b73dc766910526c59923f9afcfa11aca4fd548 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 9 Nov 2007 21:52:09 +0000 Subject: 2007-11-09 Joel Sherrill * score/src/apimutexlock.c, score/src/apimutexunlock.c: Functions were in opposite files. Whoops! --- cpukit/ChangeLog | 5 +++++ cpukit/score/src/apimutexlock.c | 20 ++++++++++++-------- cpukit/score/src/apimutexunlock.c | 20 ++++++++------------ 3 files changed, 25 insertions(+), 20 deletions(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 91f6461e84..18d6091cdb 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2007-11-09 Joel Sherrill + + * score/src/apimutexlock.c, score/src/apimutexunlock.c: Functions were + in opposite files. Whoops! + 2007-11-09 Joel Sherrill * libmisc/shell/shell.c, libmisc/shell/shell.h: Much cleanup but much 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 #include -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 + ); } diff --git a/cpukit/score/src/apimutexunlock.c b/cpukit/score/src/apimutexunlock.c index 3618af1d8a..ca824a6e6c 100644 --- a/cpukit/score/src/apimutexunlock.c +++ b/cpukit/score/src/apimutexunlock.c @@ -16,19 +16,15 @@ #include #include -void _API_Mutex_Lock( +void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { - ISR_Level level; - - _ISR_Disable( level ); - - _CORE_mutex_Seize( - &the_mutex->Mutex, - the_mutex->Object.id, - TRUE, - 0, - level - ); + _Thread_Disable_dispatch(); + _CORE_mutex_Surrender( + &the_mutex->Mutex, + the_mutex->Object.id, + NULL + ); + _Thread_Enable_dispatch(); } -- cgit v1.2.3