summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-08-14 09:29:56 +1000
committerChris Johns <chrisj@rtems.org>2013-08-14 09:29:56 +1000
commit40398c45dcd9734b41f37ae4c5af124d58b59b32 (patch)
treea44774768023c36fb4e3ed758d5ab1f42d4fe9b6 /cpukit
parentpowerpc: Fix _CPU_Context_validate() (diff)
downloadrtems-40398c45dcd9734b41f37ae4c5af124d58b59b32.tar.bz2
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.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/posix/src/mutexinit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c
index e7663c988b..592c77a2ac 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;