diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-08-14 07:38:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-08-14 07:38:41 +0000 |
commit | c67c02731b6507c5351bca70451441d9a26113ef (patch) | |
tree | afe8d99e55401fe7955475ab97a497cae2e23ab2 /nptl/pthread_mutex_init.c | |
parent | 39762d6a5c0e378f20b28da7450868bfef588fb0 (diff) |
Updated to fedora-glibc-20070814T0725cvs/fedora-glibc-2_6_90-9
Diffstat (limited to 'nptl/pthread_mutex_init.c')
-rw-r--r-- | nptl/pthread_mutex_init.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nptl/pthread_mutex_init.c b/nptl/pthread_mutex_init.c index 96f1fb00f8..d9b1ef0b98 100644 --- a/nptl/pthread_mutex_init.c +++ b/nptl/pthread_mutex_init.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -20,6 +21,7 @@ #include <assert.h> #include <errno.h> #include <string.h> +#include <kernel-features.h> #include "pthreadP.h" static const struct pthread_mutexattr default_attr = @@ -120,6 +122,12 @@ __pthread_mutex_init (mutex, mutexattr) break; } + /* The kernel when waking robust mutexes on exit never uses + FUTEX_PRIVATE_FLAG FUTEX_WAKE. */ + if ((imutexattr->mutexkind & (PTHREAD_MUTEXATTR_FLAG_PSHARED + | PTHREAD_MUTEXATTR_FLAG_ROBUST)) != 0) + mutex->__data.__kind |= PTHREAD_MUTEX_PSHARED_BIT; + /* Default values: mutex not used yet. */ // mutex->__count = 0; already done by memset // mutex->__owner = 0; already done by memset |