This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, origin/ibm/2.8/master, updated. glibc-2.8-34-g69527ce


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, origin/ibm/2.8/master has been updated
       via  69527ce104479dfbacf65c239e4d1edb65e07c8d (commit)
      from  ae4269f244f4806fbd93cca5077cca6a441e2e24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69527ce104479dfbacf65c239e4d1edb65e07c8d

commit 69527ce104479dfbacf65c239e4d1edb65e07c8d
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Sat Nov 1 19:51:41 2008 +0000

    Git cherry-pick of commit efac1fce6212f0e471ce7fa2519b1d3a4a084ddc
    
    [BZ #6955]
    
    2008-11-01  Ulrich Drepper  <drepper@redhat.com>
    	[BZ #6955]
    	* pthread_mutex_lock.c: Add support for private PI mutexes.
    	* pthread_mutex_timedlock.c: Likewise.
    	* pthread_mutex_trylock.c: Likewise.
    	* pthread_mutex_unlock.c: Likewise.
    	Patch mostly by Ben Jackson <ben@ben.com>.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index d8d0174..6efbe4c 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,12 @@
+2008-11-01  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #6955]
+	* pthread_mutex_lock.c: Add support for private PI mutexes.
+	* pthread_mutex_timedlock.c: Likewise.
+	* pthread_mutex_trylock.c: Likewise.
+	* pthread_mutex_unlock.c: Likewise.
+	Patch mostly by Ben Jackson <ben@ben.com>.
+
 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
 
 	[BZ #6740]
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index ed98dfc..3eb5636 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -269,9 +269,13 @@ __pthread_mutex_lock (mutex)
 	  {
 	    /* The mutex is locked.  The kernel will now take care of
 	       everything.  */
+	    int private = (robust
+			   ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
+			   : PTHREAD_MUTEX_PSHARED (mutex));
 	    INTERNAL_SYSCALL_DECL (__err);
 	    int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
-				      FUTEX_LOCK_PI, 1, 0);
+				      __lll_private_flag (FUTEX_LOCK_PI,
+							  private), 1, 0);
 
 	    if (INTERNAL_SYSCALL_ERROR_P (e, __err)
 		&& (INTERNAL_SYSCALL_ERRNO (e, __err) == ESRCH
@@ -327,7 +331,10 @@ __pthread_mutex_lock (mutex)
 
 	    INTERNAL_SYSCALL_DECL (__err);
 	    INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
-			      FUTEX_UNLOCK_PI, 0, 0);
+			      __lll_private_flag (FUTEX_UNLOCK_PI,
+						  PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
+),
+			      0, 0);
 
 	    THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
 	    return ENOTRECOVERABLE;
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index 4bf0efe..8d0db79 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -254,10 +254,15 @@ pthread_mutex_timedlock (mutex, abstime)
 	    /* The mutex is locked.  The kernel will now take care of
 	       everything.  The timeout value must be a relative value.
 	       Convert it.  */
+	    int private = (robust
+			   ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
+			   : PTHREAD_MUTEX_PSHARED (mutex));
 	    INTERNAL_SYSCALL_DECL (__err);
 
 	    int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
-				      FUTEX_LOCK_PI, 1, abstime);
+				      __lll_private_flag (FUTEX_LOCK_PI,
+							  private), 1,
+				      abstime);
 	    if (INTERNAL_SYSCALL_ERROR_P (e, __err))
 	      {
 		if (INTERNAL_SYSCALL_ERRNO (e, __err) == ETIMEDOUT)
@@ -331,7 +336,9 @@ pthread_mutex_timedlock (mutex, abstime)
 
 	    INTERNAL_SYSCALL_DECL (__err);
 	    INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
-			      FUTEX_UNLOCK_PI, 0, 0);
+			      __lll_private_flag (FUTEX_UNLOCK_PI,
+						  PTHREAD_ROBUST_MUTEX_PSHARED (mutex)),
+			      0, 0);
 
 	    THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
 	    return ENOTRECOVERABLE;
diff --git a/nptl/pthread_mutex_trylock.c b/nptl/pthread_mutex_trylock.c
index f6e24d4..25029be 100644
--- a/nptl/pthread_mutex_trylock.c
+++ b/nptl/pthread_mutex_trylock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005-2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -231,9 +231,13 @@ __pthread_mutex_trylock (mutex)
 
 	    /* The mutex owner died.  The kernel will now take care of
 	       everything.  */
+	    int private = (robust
+			   ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
+			   : PTHREAD_MUTEX_PSHARED (mutex));
 	    INTERNAL_SYSCALL_DECL (__err);
 	    int e = INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
-				      FUTEX_TRYLOCK_PI, 0, 0);
+				      __lll_private_flag (FUTEX_TRYLOCK_PI,
+							  private), 0, 0);
 
 	    if (INTERNAL_SYSCALL_ERROR_P (e, __err)
 		&& INTERNAL_SYSCALL_ERRNO (e, __err) == EWOULDBLOCK)
@@ -274,7 +278,9 @@ __pthread_mutex_trylock (mutex)
 
 	    INTERNAL_SYSCALL_DECL (__err);
 	    INTERNAL_SYSCALL (futex, __err, 4, &mutex->__data.__lock,
-			      FUTEX_UNLOCK_PI, 0, 0);
+			      __lll_private_flag (FUTEX_UNLOCK_PI,
+						  PTHREAD_ROBUST_MUTEX_PSHARED (mutex)),
+			      0, 0);
 
 	    THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);
 	    return ENOTRECOVERABLE;
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index d33d059..a14c43e 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005-2007, 2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -196,9 +196,13 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
 						   THREAD_GETMEM (THREAD_SELF,
 								  tid)))
 	{
+	  int robust = mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP;
+	  int private = (robust
+			 ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex)
+			 : PTHREAD_MUTEX_PSHARED (mutex));
 	  INTERNAL_SYSCALL_DECL (__err);
 	  INTERNAL_SYSCALL (futex, __err, 2, &mutex->__data.__lock,
-			    FUTEX_UNLOCK_PI);
+			    __lll_private_flag (FUTEX_UNLOCK_PI, private));
 	}
 
       THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL);

-----------------------------------------------------------------------

Summary of changes:
 nptl/ChangeLog                 |    9 +++++++++
 nptl/pthread_mutex_lock.c      |   13 ++++++++++---
 nptl/pthread_mutex_timedlock.c |   13 ++++++++++---
 nptl/pthread_mutex_trylock.c   |   12 +++++++++---
 nptl/pthread_mutex_unlock.c    |    8 ++++++--
 5 files changed, 44 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]