[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r10867 - in /fsf/trunk/libc: ./ dlfcn/ nptl/ nptl/sysdeps/unix/sysv/linux/i386/i486/ nptl/sysdeps/unix/sysv/linux/x86_64/



Author: eglibc
Date: Fri Jul  2 00:03:13 2010
New Revision: 10867

Log:
Import glibc-mainline for 2010-07-02

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/dlfcn/Makefile
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/Makefile
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
    fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jul  2 00:03:13 2010
@@ -1,3 +1,8 @@
+2010-06-30  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Readd
+	$(common-objpfx)libc_nonshared.a.
+
 2010-06-21  Luis Machado  <luisgpm@xxxxxxxxxx>
 
 	* sysdeps/powerpc/powerpc32/970/fpu/Implies: Remove.

Modified: fsf/trunk/libc/dlfcn/Makefile
==============================================================================
--- fsf/trunk/libc/dlfcn/Makefile (original)
+++ fsf/trunk/libc/dlfcn/Makefile Fri Jul  2 00:03:13 2010
@@ -124,7 +124,7 @@
 $(objpfx)bug-atexit2: $(libdl)
 $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
 
-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh
+LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)libc_nonshared.a
 $(objpfx)bug-atexit3: $(libdl)
 $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
 

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Fri Jul  2 00:03:13 2010
@@ -1,3 +1,27 @@
+2010-07-01  Andreas Schwab  <schwab@xxxxxxxxxx>
+	    Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* 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@xxxxxxxxxx>
+
+	* Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
+
 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@xxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect

Modified: fsf/trunk/libc/nptl/Makefile
==============================================================================
--- fsf/trunk/libc/nptl/Makefile (original)
+++ fsf/trunk/libc/nptl/Makefile Fri Jul  2 00:03:13 2010
@@ -256,6 +256,7 @@
 	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)
@@ -491,7 +492,8 @@
 $(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

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -188,6 +188,9 @@
 	je	.Lreltmo
 # endif
 
+	cmpl	$0, (%edx)
+	js	8f
+
 	movl	%ecx, %ebx
 	movl	%esi, %ecx
 	movl	%edx, %esi
@@ -222,6 +225,9 @@
 	cfi_adjust_cfa_offset(-4)
 	cfi_restore(%ebp)
 	ret
+
+8:	movl	$ETIMEDOUT, %eax
+	jmp	7b
 
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 .Lreltmo:

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -169,9 +169,13 @@
 	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)
@@ -200,6 +204,9 @@
 	popq	%r9
 	cfi_adjust_cfa_offset(-8)
 	cfi_restore(%r9)
+	retq
+
+5:	movl	$ETIMEDOUT, %eax
 	retq
 
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -125,6 +124,9 @@
 	je	.Lreltmo
 # endif
 
+	cmpq	$0, (%rdx)
+	js	7f
+
 	pushq	%r9
 	cfi_adjust_cfa_offset(8)
 	cfi_rel_offset(%r9, 0)
@@ -179,6 +181,9 @@
 	jmp	3b
 	cfi_adjust_cfa_offset(-8)
 	cfi_restore(%r9)
+
+7:	movl	$ETIMEDOUT, %eax
+	retq
 
 
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -143,6 +143,10 @@
 	movl	broadcast_seq(%rdi), %edx
 	movq	%r9, 24(%rsp)
 	movl	%edx, 4(%rsp)
+
+	cmpq	$0, (%r13)
+	movq	$-ETIMEDOUT, %r14
+	js	36f
 
 38:	movl	cond_futex(%rdi), %r12d
 

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -101,6 +101,9 @@
 #  endif
 	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

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -98,6 +98,9 @@
 #  endif
 	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

Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S Fri Jul  2 00:03:13 2010
@@ -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@xxxxxxxxxx>, 2002.
 
@@ -77,6 +77,9 @@
 	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
@@ -163,6 +166,19 @@
 #else
 	callq	__errno_location@plt
 	movl	$EINVAL, (%rax)
+#endif
+
+	orl	$-1, %eax
+
+	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