From 03e8928753ef76cb747b965938092c59d6306060 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 27 Mar 2014 14:46:31 +0100 Subject: score: Delete CORE_mutex_Control::lock The holder field is enough to determine if a mutex is locked or not. This leads also to better error status codes in case a rtems_semaphore_release() is done for a mutex without having the ownership. --- cpukit/score/src/coremutex.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/coremutex.c') diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c index 1c6c3db302..96b11c9cd1 100644 --- a/cpukit/score/src/coremutex.c +++ b/cpukit/score/src/coremutex.c @@ -27,7 +27,7 @@ CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, Thread_Control *executing, const CORE_mutex_Attributes *the_mutex_attributes, - uint32_t initial_lock + bool initially_locked ) { @@ -37,9 +37,8 @@ CORE_mutex_Status _CORE_mutex_Initialize( */ the_mutex->Attributes = *the_mutex_attributes; - the_mutex->lock = initial_lock; - if ( initial_lock == CORE_MUTEX_LOCKED ) { + if ( initially_locked ) { the_mutex->nest_count = 1; the_mutex->holder = executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || -- cgit v1.2.3