[rtems commit] posix: Handle recursive attributes correctly.

Chris Johns chrisj at rtems.org
Tue Aug 13 23:26:47 UTC 2013


Module:    rtems
Branch:    master
Commit:    40398c45dcd9734b41f37ae4c5af124d58b59b32
Changeset: http://git.rtems.org/rtems/commit/?id=40398c45dcd9734b41f37ae4c5af124d58b59b32

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Aug 14 09:29:56 2013 +1000

posix: Handle recursive attributes correctly.

The recursive field in the pthread_mutexattr_t is now not used. The
code in pthread_mutexattr_settype only sets the type field and not
the recursive field.

---

 cpukit/posix/src/mutexinit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c
index e7663c9..592c77a 100644
--- a/cpukit/posix/src/mutexinit.c
+++ b/cpukit/posix/src/mutexinit.c
@@ -165,7 +165,7 @@ int pthread_mutex_init(
 
   the_mutex_attr = &the_mutex->Mutex.Attributes;
 
-  if ( the_attr->recursive )
+  if ( the_attr->type == PTHREAD_MUTEX_RECURSIVE )
     the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
   else
     the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR;




More information about the vc mailing list