Does this mean that recursive mutexes didn't work up to now and we don't have a test case for recursive mutexes?

On 2013-08-14 01:26, Chris Johns wrote:
Module:    rtems
Branch:    master
Commit:    40398c45dcd9734b41f37ae4c5af124d58b59b32
Changeset: 
http://git.rtems.org/rtems/commit/?id=40398c45dcd9734b41f37ae4c5af124d58b59b32

Author:    Chris Johns <chr...@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;

_______________________________________________
rtems-vc mailing list
rtems...@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-vc



--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to