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 master updated. glibc-2.19-808-gbc1da17


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, master has been updated
       via  bc1da1765e901a9a9f532f91d09f5237655e01fd (commit)
      from  6a42be57e8755c956a89d1cae02e99172eba082a (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc1da1765e901a9a9f532f91d09f5237655e01fd

commit bc1da1765e901a9a9f532f91d09f5237655e01fd
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Thu Jul 10 16:42:51 2014 -0500

    PowerPC: Fix build due missing lll_robust_trylock
    
    Commit 887865f remove the lll_robust_trylock definition on all
    architectures, however for powerpc both __lll_trylock and
    __lll_cond_trylock were based on lll_robust_trylock definition.
    This patch restore it with a different name.

diff --git a/ChangeLog b/ChangeLog
index b65dfa8..99b8732 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-07-10  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_base_trylock):
+	New define.
+	(__lll_trylock): Use __lll_base_trylock.
+	(__lll_cond_trylock): Likewise.
+
 2014-07-10  Roland McGrath  <roland@hack.frob.com>
 
 	* nptl/pthread_create.c (start_thread): Use atomic_or and
diff --git a/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
index d7e1e38..a651d23 100644
--- a/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
@@ -190,13 +190,28 @@
 # endif
 #endif
 
+/* Set *futex to ID if it is 0, atomically.  Returns the old value */
+#define __lll_base_trylock(futex, id) \
+  ({ int __val;								      \
+     __asm __volatile ("1:	lwarx	%0,0,%2" MUTEX_HINT_ACQ "\n"	      \
+		       "	cmpwi	0,%0,0\n"			      \
+		       "	bne	2f\n"				      \
+		       "	stwcx.	%3,0,%2\n"			      \
+		       "	bne-	1b\n"				      \
+		       "2:	" __lll_acq_instr			      \
+		       : "=&r" (__val), "=m" (*futex)			      \
+		       : "r" (futex), "r" (id), "m" (*futex)		      \
+		       : "cr0", "memory");				      \
+     __val;								      \
+  })
+
 /* Set *futex to 1 if it is 0, atomically.  Returns the old value */
-#define __lll_trylock(futex) __lll_robust_trylock (futex, 1)
+#define __lll_trylock(futex) __lll_base_trylock (futex, 1)
 
 #define lll_trylock(lock)	__lll_trylock (&(lock))
 
 /* Set *futex to 2 if it is 0, atomically.  Returns the old value */
-#define __lll_cond_trylock(futex) __lll_robust_trylock (futex, 2)
+#define __lll_cond_trylock(futex) __lll_base_trylock (futex, 2)
 
 #define lll_cond_trylock(lock)	__lll_cond_trylock (&(lock))
 

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

Summary of changes:
 ChangeLog                                      |    7 +++++++
 sysdeps/unix/sysv/linux/powerpc/lowlevellock.h |   19 +++++++++++++++++--
 2 files changed, 24 insertions(+), 2 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]