summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/apimutexunlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/apimutexunlock.c')
-rw-r--r--cpukit/score/src/apimutexunlock.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/cpukit/score/src/apimutexunlock.c b/cpukit/score/src/apimutexunlock.c
index e1fe6459d3..b4a5592059 100644
--- a/cpukit/score/src/apimutexunlock.c
+++ b/cpukit/score/src/apimutexunlock.c
@@ -20,25 +20,17 @@
#endif
#include <rtems/score/apimutex.h>
-#include <rtems/score/coremuteximpl.h>
+#include <rtems/score/threadimpl.h>
void _API_Mutex_Unlock( API_Mutex_Control *the_mutex )
{
- Thread_queue_Context queue_context;
- Thread_Life_state previous_thread_life_state;
- bool restore_thread_life_protection;
+ Thread_Life_state previous_thread_life_state;
+ bool restore_thread_life_protection;
previous_thread_life_state = the_mutex->previous_thread_life_state;
- restore_thread_life_protection = the_mutex->Mutex.nest_level == 0;
+ restore_thread_life_protection = the_mutex->Mutex._nest_level == 0;
- _Thread_queue_Context_initialize( &queue_context );
- _ISR_lock_ISR_disable( &queue_context.Lock_context.Lock_context );
- _CORE_recursive_mutex_Surrender(
- &the_mutex->Mutex,
- CORE_MUTEX_TQ_PRIORITY_INHERIT_OPERATIONS,
- _Thread_Executing,
- &queue_context
- );
+ _Mutex_recursive_Release( &the_mutex->Mutex );
if ( restore_thread_life_protection ) {
_Thread_Set_life_protection( previous_thread_life_state );