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.12-50-g2983d85


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  2983d85ee5492c4ab1f09ca554e47192fa5c97a2 (commit)
       via  72b6e8c85b95a949d8c5d827a16dd1492d9ef26b (commit)
      from  f47c9a11ad382c521d37c18d6b74c5017ffe4c1d (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=2983d85ee5492c4ab1f09ca554e47192fa5c97a2

commit 2983d85ee5492c4ab1f09ca554e47192fa5c97a2
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Jul 1 19:07:14 2010 -0700

    Work around kernel rejecting valid absolute timestamps

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 05c16ce..d60e368 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-01  Andreas Schwab  <schwab@redhat.com>
+	    Ulrich Drepper  <drepper@redhat.com>
+
+	* Makefile (tests): Add tst-abstime.
+	* tst-abstime.c: New file.
+	* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+	(__lll_timedlock_wait): Check for timestamp before the Epoch.
+	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+	(__lll_timedlock_wait): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
+	(__lll_robust_timedlock_wait): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+	(__pthread_cond_timedwait): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+	(pthread_rwlock_timedrdlock): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+	(pthread_rwlock_timedwrlock): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
+	Likewise.
+
 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
 
 	* Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
diff --git a/nptl/Makefile b/nptl/Makefile
index 3dcc876..51b6ae5 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -256,6 +256,7 @@ tests = tst-typesizes \
 	tst-sched1 \
 	tst-backtrace1 \
 	tst-oddstacklimit \
+	tst-abstime \
 	tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
 	tst-getpid1 tst-getpid2 tst-getpid3 \
 	tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99)
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
index 7578c7e..2198ccf 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -188,6 +188,9 @@ __lll_timedlock_wait:
 	je	.Lreltmo
 # endif
 
+	cmpl	$0, (%edx)
+	js	8f
+
 	movl	%ecx, %ebx
 	movl	%esi, %ecx
 	movl	%edx, %esi
@@ -223,6 +226,9 @@ __lll_timedlock_wait:
 	cfi_restore(%ebp)
 	ret
 
+8:	movl	$ETIMEDOUT, %eax
+	jmp	7b
+
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:
 	/* Check for a valid timeout value.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 8de9cf4..3195db2 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -169,9 +169,13 @@ __lll_timedlock_wait:
 	je	.Lreltmo
 # endif
 
+	cmpq	$0, (%rdx)
+	js	5f
+
 	pushq	%r9
 	cfi_adjust_cfa_offset(8)
 	cfi_rel_offset(%r9, 0)
+
 	movq	%rdx, %r10
 	movl	$0xffffffff, %r9d
 	LOAD_FUTEX_WAIT_ABS (%esi)
@@ -202,6 +206,9 @@ __lll_timedlock_wait:
 	cfi_restore(%r9)
 	retq
 
+5:	movl	$ETIMEDOUT, %eax
+	retq
+
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:
 	/* Check for a valid timeout value.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
index 02db0a4..5218a4f 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
@@ -1,5 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009
-   Free Software Foundation, Inc.
+/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -125,6 +124,9 @@ __lll_robust_timedlock_wait:
 	je	.Lreltmo
 # endif
 
+	cmpq	$0, (%rdx)
+	js	7f
+
 	pushq	%r9
 	cfi_adjust_cfa_offset(8)
 	cfi_rel_offset(%r9, 0)
@@ -180,6 +182,9 @@ __lll_robust_timedlock_wait:
 	cfi_adjust_cfa_offset(-8)
 	cfi_restore(%r9)
 
+7:	movl	$ETIMEDOUT, %eax
+	retq
+
 
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index be14fc8..e6535fb 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -144,6 +144,10 @@ __pthread_cond_timedwait:
 	movq	%r9, 24(%rsp)
 	movl	%edx, 4(%rsp)
 
+	cmpq	$0, (%r13)
+	movq	$-ETIMEDOUT, %r14
+	js	36f
+
 38:	movl	cond_futex(%rdi), %r12d
 
 	/* Unlock.  */
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index 23b218a..f5d055c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -102,6 +102,9 @@ pthread_rwlock_timedrdlock:
 	je	.Lreltmo
 #endif
 
+	cmpq	$0, (%r13)
+	js	16f		/* Time is already up.  */
+
 	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
 	xorl	PSHARED(%r12), %esi
 	movq	%r13, %r10
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index cd867b6..6ed8b49 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -99,6 +99,9 @@ pthread_rwlock_timedwrlock:
 	je	.Lreltmo
 #endif
 
+	cmpq	$0, (%r13)
+	js	16f		/* Time is already up. */
+
 	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
 	xorl	PSHARED(%r12), %esi
 	movq	%r13, %r10
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
index 0291beb..ca49cb8 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2005,2007,2009,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -77,6 +77,9 @@ sem_timedwait:
 	je	.Lreltmo
 #endif
 
+	cmpq	$0, (%rsi)
+	js	16f
+
 	/* This push is only needed to store the sem_t pointer for the
 	   exception handler.  */
 	pushq	%rdi
@@ -169,6 +172,19 @@ sem_timedwait:
 
 	retq
 
+16:
+#if USE___THREAD
+	movq	errno@gottpoff(%rip), %rdx
+	movl	$ETIMEDOUT, %fs:(%rdx)
+#else
+	callq	__errno_location@plt
+	movl	$ETIMEDOUT, (%rax)
+#endif
+
+	orl	$-1, %eax
+
+	retq
+
 #ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:
 	pushq	%r12

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72b6e8c85b95a949d8c5d827a16dd1492d9ef26b

commit 72b6e8c85b95a949d8c5d827a16dd1492d9ef26b
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Thu Jul 1 19:03:29 2010 -0700

    Fix build with newer linker.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 49ead51..05c16ce 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-01  Ulrich Drepper  <drepper@redhat.com>
+
+	* Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
+
 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
 
 	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
diff --git a/nptl/Makefile b/nptl/Makefile
index 982db8e..3dcc876 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -491,7 +491,8 @@ $(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.so
 $(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
 LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
 LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
-$(objpfx)tst-_res1: $(objpfx)tst-_res1mod2.so $(shared-thread-library)
+$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
+		    $(shared-thread-library)
 else
 $(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
 $(objpfx)tst-cond19: $(common-objpfx)rt/librt.a

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

Summary of changes:
 nptl/ChangeLog                                     |   24 ++++++++++++++++++++
 nptl/Makefile                                      |    4 ++-
 .../unix/sysv/linux/i386/i486/lowlevellock.S       |    8 +++++-
 nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S |    9 ++++++-
 .../unix/sysv/linux/x86_64/lowlevelrobustlock.S    |    9 +++++-
 .../sysv/linux/x86_64/pthread_cond_timedwait.S     |    6 ++++-
 .../sysv/linux/x86_64/pthread_rwlock_timedrdlock.S |    5 +++-
 .../sysv/linux/x86_64/pthread_rwlock_timedwrlock.S |    5 +++-
 .../sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S |   18 ++++++++++++++-
 9 files changed, 79 insertions(+), 9 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]