Hello community,
here is the log from the commit of package glibc
checked in at Fri Jul 13 22:34:03 CEST 2007.
--------
--- glibc/glibc.changes 2007-06-28 15:00:12.000000000 +0200
+++ /mounts/work_src_done/STABLE/glibc/glibc.changes 2007-07-13 18:28:24.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Jul 13 18:27:49 CEST 2007 - schwab@suse.de
+
+- Update to head of glibc-2.6 branch.
+- Fix update on ppc.
+
+-------------------------------------------------------------------
Old:
----
glibc-2.3.3-amd64-string.diff
glibc-2.6-2007051612.tar.bz2
glibc-2.6-epoll.diff
glibc-2.6-futex-waiters.diff
glibc-2.6-malloc.diff
glibc-2.6-printf.diff
glibc-2.6-printf-ldouble.diff
glibc-nptl-2.6-2007051612.tar.bz2
minmem
New:
----
glibc-2.6-20070713.tar.bz2
glibc-2.6-configure.diff
glibc-nptl-2.6-20070713.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ glibc.spec ++++++
--- /var/tmp/diff_new_pack.Po8273/_old 2007-07-13 22:33:04.000000000 +0200
+++ /var/tmp/diff_new_pack.Po8273/_new 2007-07-13 22:33:04.000000000 +0200
@@ -20,15 +20,15 @@
%define powerpc_optimize_cpu_power4 1
%define powerpc_optimize_cpu_power5 1
%define powerpc_optimize_cpu_power6 1
-License: BSD License and BSD-like, GNU General Public License (GPL)
+License: BSD 3-Clause, GPL v2 or later
Summary: Standard Shared Libraries (from the GNU C Library)
Group: System/Libraries
Obsoletes: ngpt ngpt-devel
Provides: rtld(GNU_HASH)
Autoreqprov: on
Version: 2.6
-Release: 7
-%define snapshot_date 2007051612
+Release: 10
+%define snapshot_date 20070713
URL: http://www.gnu.org/software/libc/libc.html
PreReq: filesystem
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -55,7 +55,6 @@
Patch11: glibc-2.3.2-revert_tcsetattr.diff
Patch12: glibc-2.3.1.localedef.diff
Patch14: glibc-2.3.2.no_archive.diff
-Patch15: glibc-2.3.3-amd64-string.diff
Patch16: libm-x86-64.diff
Patch17: glibc-2.3.90-bindresvport.blacklist.diff
Patch18: glibc-suse-note.diff
@@ -77,11 +76,7 @@
Patch34: glibc-2.5-ldconfig-old-cache.diff
Patch35: timezone.diff
Patch36: glibc-2.5-ppc-llrintl.diff
-Patch37: glibc-2.6-epoll.diff
-Patch38: glibc-2.6-futex-waiters.diff
-Patch39: glibc-2.6-malloc.diff
-Patch40: glibc-2.6-printf.diff
-Patch41: glibc-2.6-printf-ldouble.diff
+Patch37: glibc-2.6-configure.diff
Patch42: glibc-2.6-initfini.diff
%description
@@ -222,9 +217,6 @@
%patch11
%patch12
%patch14
-%patch15
-# strncmp is broken, let's delete it for now this way
-rm sysdeps/x86_64/strncmp.S
%patch16 -E
# We have s_sincos.c in patch20, remove duplicate
rm sysdeps/x86_64/fpu/s_sincos.S
@@ -249,10 +241,6 @@
%patch35
%patch36
%patch37
-%patch38
-%patch39
-%patch40
-%patch41
%patch42
%patch5
find . -name configure | xargs touch
@@ -285,14 +273,17 @@
%ifarch sparc64
BuildFlags="-O2 -mcpu=ultrasparc -mvis -fcall-used-g6"
BuildCC="gcc -m64"
+BuildCCplus="$BuildCCplus -m64"
%endif
%ifarch sparc
BuildFlags="$BuildFlags -fcall-used-g6"
BuildCC="gcc -m32"
+BuildCCplus="$BuildCCplus -m32"
%endif
%ifarch sparcv9
BuildFlags="$BuildFlags -mcpu=ultrasparc -fcall-used-g6"
BuildCC="gcc -m32"
+BuildCCplus="$BuildCCplus -m32"
%endif
%ifarch alphaev6
BuildFlags="-mcpu=ev6"
@@ -331,12 +322,12 @@
CFLAGS="$cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \
--prefix=%{_prefix} \
--libexecdir=%{_libdir} --infodir=%{_infodir} \
- --enable-add-ons=nptl$addons --srcdir=.. --without-cvs --enable-profile \
- $* \
+ --enable-add-ons=nptl$addons --without-cvs --enable-profile \
+ "$@" \
%if %{enable_stackguard_randomization}
--enable-stackguard-randomization \
%endif
- --build %{_target_cpu}-suse-linux --host %{_target_cpu}-suse-linux \
+ --build=%{_target_cpu}-suse-linux \
--with-tls --with-__thread --enable-kernel=2.6.4
make $PARALLEL
}
@@ -395,9 +386,12 @@
#
# Build glibc_post_upgrade binary
#
-gcc -static -Os -g $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
+$BuildCC -static -Os -g $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
-Lcc-nptl -Bcc-nptl/csu \
'-DREMOVE_TLS_DIRS' \
+%if !%{optimize_power}
+ '-DREMOVE_PPC_OPTIMIZE_DIRS' \
+%endif
'-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"'
%install
@@ -405,7 +399,7 @@
# at least not from libpthread.so.* because it is used by libthread_db to find
# some non-exported symbols in order to detect if threading support
# should be enabled. These symbols are _not_ exported, and we can't easily
-# export them retroactively without changing the API. So we have to
+# export them retroactively without changing the ABI. So we have to
# continue to "export" them via .symtab, instead of .dynsym :-(
export STRIP_KEEP_SYMTAB=libpthread*
# Make sure we will create the gconv-modules.cache
@@ -929,6 +923,9 @@
%{_libdir}/libdl_p.a
%changelog
+* Fri Jul 13 2007 - schwab@suse.de
+- Update to head of glibc-2.6 branch.
+- Fix update on ppc.
* Thu Jun 28 2007 - matz@suse.de
- Add a provide for "rtld(GNU_HASH)".
* Sun Jun 17 2007 - schwab@suse.de
++++++ glibc-2.6-2007051612.tar.bz2 -> glibc-2.6-20070713.tar.bz2 ++++++
glibc/glibc-2.6-2007051612.tar.bz2 /mounts/work_src_done/STABLE/glibc/glibc-2.6-20070713.tar.bz2 differ: byte 11, line 1
++++++ glibc-2.6-configure.diff ++++++
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.469
diff -u -a -p -u -p -a -r1.469 configure.in
--- configure.in 20 Mar 2007 12:11:23 -0000 1.469
+++ configure.in 13 Jul 2007 13:40:20 -0000
@@ -1278,7 +1278,7 @@ EOF
fi
fi
fi
- rm -f conftest.[cs]
+ rm -f conftest*
])
if test $libc_cv_visibility_attribute != yes; then
AC_MSG_ERROR(compiler support for visibility attribute is required)
@@ -1294,7 +1294,7 @@ EOF
int bar (int x) { return x; }
EOF
libc_cv_broken_visibility_attribute=yes
- if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s1>&AS_MESSAGE_LOG_FD); then
+ if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s >&AS_MESSAGE_LOG_FD); then
changequote(,)dnl
if grep '\.hidden[ _]foo' conftest.s >/dev/null; then
changequote([,])dnl
Index: configure
===================================================================
RCS file: /cvs/glibc/libc/configure,v
retrieving revision 1.459
diff -u -a -p -u -p -a -r1.459 configure
--- configure 20 Mar 2007 12:11:23 -0000 1.459
+++ configure 13 Jul 2007 13:41:41 -0000
@@ -5371,7 +5371,7 @@ EOF
fi
fi
fi
- rm -f conftest.cs
+ rm -f conftest*
fi
echo "$as_me:$LINENO: result: $libc_cv_visibility_attribute" >&5
@@ -5395,7 +5395,7 @@ else
int bar (int x) { return x; }
EOF
libc_cv_broken_visibility_attribute=yes
- if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s1>&5'
+ if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
++++++ glibc-nptl-2.6-2007051612.tar.bz2 -> glibc-nptl-2.6-20070713.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/allocatestack.c new/nptl/allocatestack.c
--- old/nptl/allocatestack.c 2007-05-18 10:39:36.000000000 +0200
+++ new/nptl/allocatestack.c 2007-07-13 11:56:52.000000000 +0200
@@ -996,3 +996,60 @@
lll_unlock (stack_cache_lock);
}
+
+
+void
+attribute_hidden
+__wait_lookup_done (void)
+{
+ lll_lock (stack_cache_lock);
+
+ struct pthread *self = THREAD_SELF;
+
+ /* Iterate over the list with system-allocated threads first. */
+ list_t *runp;
+ list_for_each (runp, &stack_used)
+ {
+ struct pthread *t = list_entry (runp, struct pthread, list);
+ if (t == self || t->header.gscope_flag == THREAD_GSCOPE_FLAG_UNUSED)
+ continue;
+
+ int *const gscope_flagp = &t->header.gscope_flag;
+
+ /* We have to wait until this thread is done with the global
+ scope. First tell the thread that we are waiting and
+ possibly have to be woken. */
+ if (atomic_compare_and_exchange_bool_acq (gscope_flagp,
+ THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_FLAG_USED))
+ continue;
+
+ do
+ lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT);
+ while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT);
+ }
+
+ /* Now the list with threads using user-allocated stacks. */
+ list_for_each (runp, &__stack_user)
+ {
+ struct pthread *t = list_entry (runp, struct pthread, list);
+ if (t == self || t->header.gscope_flag == THREAD_GSCOPE_FLAG_UNUSED)
+ continue;
+
+ int *const gscope_flagp = &t->header.gscope_flag;
+
+ /* We have to wait until this thread is done with the global
+ scope. First tell the thread that we are waiting and
+ possibly have to be woken. */
+ if (atomic_compare_and_exchange_bool_acq (gscope_flagp,
+ THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_FLAG_USED))
+ continue;
+
+ do
+ lll_futex_wait (gscope_flagp, THREAD_GSCOPE_FLAG_WAIT);
+ while (*gscope_flagp == THREAD_GSCOPE_FLAG_WAIT);
+ }
+
+ lll_unlock (stack_cache_lock);
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/ChangeLog new/nptl/ChangeLog
--- old/nptl/ChangeLog 2007-05-18 10:39:36.000000000 +0200
+++ new/nptl/ChangeLog 2007-07-13 11:56:52.000000000 +0200
@@ -1,3 +1,124 @@
+2007-06-22 Jakub Jelinek
+
+ * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
+ cpusetsize if pthread_getaffinity_np failed with ENOSYS.
+
+2007-05-28 Jakub Jelinek
+
+ * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
+ insn suffix.
+ (THREAD_GSCOPE_GET_FLAG): Remove.
+ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
+ * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
+ changes.
+ * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
+ (THREAD_GSCOPE_GET_FLAG): Remove.
+ (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
+ instead of THREAD_GSCOPE_GET_FLAG.
+ (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
+ it.
+ * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+
+2007-05-24 Richard Henderson
+
+ * descr.h (struct pthread): Add header.gscope_flag.
+ * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
+ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+
+2007-05-26 Ulrich Drepper
+
+ * allocatestack.c: Revert last change.
+ * init.c: Likewise.
+ * sysdeps/i386/tls.h: Likewise.
+ * sysdeps/x86_64/tls.h: Likewise.
+
+2007-05-24 Jakub Jelinek
+
+ * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
+ (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
+ THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
+ PTR_DEMANGLE.
+ (THREAD_GSCOPE_GET_FLAG): Define.
+ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
+ * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
+ instead of ->header.gscope_flag directly.
+
+2007-05-21 Ulrich Drepper
+
+ * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
+ Remove ptr_wait_lookup_done again.
+ * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
+ (__pthread_initialize_minimal_internal): Initialize
+ _dl_wait_lookup_done pointer in _rtld_global directly.
+ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
+ Remove code to code _dl_wait_lookup_done.
+ * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
+ encrypted for now.
+
+2007-05-19 Ulrich Drepper
+
+ * allocatestack.c (__wait_lookup_done): New function.
+ * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
+ Add ptr_wait_lookup_done.
+ * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
+ * pthreadP.h: Declare __wait_lookup_done.
+ * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
+ Define macros to implement reference handling of global scope.
+ * sysdeps/x86_64/tls.h: Likewise.
+ * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
+ Initialize GL(dl_wait_lookup_done).
+
+2007-05-25 Ulrich Drepper
+
+ * Makefile (tests): Add tst-sem10.
+ * tst-sem10.c: New file.
+
+2007-05-25 Ulrich Drepper
+ Jakub Jelinek
+
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
+ Move __pthread_enable_asynccancel right before futex syscall.
+ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
+ Likewise.
+
+2007-05-21 Jakub Jelinek
+
+ * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
+ pthread_mutex_init failed with ENOTSUP.
+
+2007-05-17 Ulrich Drepper
+
+ [BZ #4512]
+ * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
+ is detected.
+ * pthread_mutex_timedlock.c: Likewise.
+ * pthread_mutex_trylock.c: Likewise.
+ Patch in part by Atsushi Nemoto .
+
+ * Makefile (tests): Add tst-robust9 and tst-robustpi9.
+ * tst-robust9.c: New file.
+ * tst-robustpi9.c: New file.
+
2007-05-14 Ulrich Drepper
* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/descr.h new/nptl/descr.h
--- old/nptl/descr.h 2007-05-18 10:39:37.000000000 +0200
+++ new/nptl/descr.h 2007-07-13 11:56:52.000000000 +0200
@@ -131,6 +131,7 @@
struct
{
int multiple_threads;
+ int gscope_flag;
} header;
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/init.c new/nptl/init.c
--- old/nptl/init.c 2007-05-18 10:39:38.000000000 +0200
+++ new/nptl/init.c 2007-07-13 11:56:52.000000000 +0200
@@ -1,4 +1,4 @@
-/* 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 , 2002.
@@ -386,6 +386,8 @@
GL(dl_init_static_tls) = &__pthread_init_static_tls;
+ GL(dl_wait_lookup_done) = &__wait_lookup_done;
+
/* Register the fork generation counter with the libc. */
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
__libc_multiple_threads_ptr =
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/Makefile new/nptl/Makefile
--- old/nptl/Makefile 2006-09-20 13:53:31.000000000 +0200
+++ new/nptl/Makefile 2007-07-13 11:56:52.000000000 +0200
@@ -1,4 +1,4 @@
-# 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.
# The GNU C Library is free software; you can redistribute it and/or
@@ -209,16 +209,16 @@
tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
tst-cond20 tst-cond21 tst-cond22 \
tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \
- tst-robust6 tst-robust7 tst-robust8 \
- tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 \
- tst-robustpi5 tst-robustpi6 tst-robustpi7 tst-robustpi8 \
+ tst-robust6 tst-robust7 tst-robust8 tst-robust9 \
+ tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \
+ tst-robustpi6 tst-robustpi7 tst-robustpi8 tst-robustpi9 \
tst-rwlock1 tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 \
tst-rwlock6 tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 \
tst-rwlock11 tst-rwlock12 tst-rwlock13 tst-rwlock14 \
tst-once1 tst-once2 tst-once3 tst-once4 \
tst-key1 tst-key2 tst-key3 tst-key4 \
tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
- tst-sem8 tst-sem9 \
+ tst-sem8 tst-sem9 tst-sem10 \
tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
tst-align tst-align2 tst-align3 \
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/pthread_getattr_np.c new/nptl/pthread_getattr_np.c
--- old/nptl/pthread_getattr_np.c 2006-04-07 06:26:42.000000000 +0200
+++ new/nptl/pthread_getattr_np.c 2007-07-13 11:56:52.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper , 2002.
@@ -168,8 +168,12 @@
{
free (cpuset);
if (ret == ENOSYS)
- /* There is no such functionality. */
- ret = 0;
+ {
+ /* There is no such functionality. */
+ ret = 0;
+ iattr->cpuset = NULL;
+ iattr->cpusetsize = 0;
+ }
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/pthread_mutex_lock.c new/nptl/pthread_mutex_lock.c
--- old/nptl/pthread_mutex_lock.c 2006-08-23 00:12:22.000000000 +0200
+++ new/nptl/pthread_mutex_lock.c 2007-07-13 11:56:52.000000000 +0200
@@ -1,4 +1,4 @@
-/* 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 , 2002.
@@ -127,6 +127,8 @@
int newval = id;
#ifdef NO_INCR
newval |= FUTEX_WAITERS;
+#else
+ newval |= (oldval & FUTEX_WAITERS);
#endif
newval
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/pthread_mutex_timedlock.c new/nptl/pthread_mutex_timedlock.c
--- old/nptl/pthread_mutex_timedlock.c 2006-08-23 00:12:22.000000000 +0200
+++ new/nptl/pthread_mutex_timedlock.c 2007-07-13 11:56:52.000000000 +0200
@@ -1,4 +1,4 @@
-/* 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 , 2002.
@@ -119,9 +119,11 @@
if ((oldval & FUTEX_OWNER_DIED) != 0)
{
/* The previous owner died. Try locking the mutex. */
- int newval
+ int newval = id | (oldval & FUTEX_WAITERS);
+
+ newval
= atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
- id, oldval);
+ newval, oldval);
if (newval != oldval)
{
oldval = newval;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/pthread_mutex_trylock.c new/nptl/pthread_mutex_trylock.c
--- old/nptl/pthread_mutex_trylock.c 2007-05-18 10:39:41.000000000 +0200
+++ new/nptl/pthread_mutex_trylock.c 2007-07-13 11:56:52.000000000 +0200
@@ -84,9 +84,11 @@
if ((oldval & FUTEX_OWNER_DIED) != 0)
{
/* The previous owner died. Try locking the mutex. */
- int newval
+ int newval = id | (oldval & FUTEX_WAITERS);
+
+ newval
= atomic_compare_and_exchange_val_acq (&mutex->__data.__lock,
- id, oldval);
+ newval, oldval);
if (newval != oldval)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/pthreadP.h new/nptl/pthreadP.h
--- old/nptl/pthreadP.h 2006-08-28 00:49:06.000000000 +0200
+++ new/nptl/pthreadP.h 2007-07-13 11:56:52.000000000 +0200
@@ -1,4 +1,4 @@
-/* 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 , 2002.
@@ -545,6 +545,8 @@
extern void __free_stack_cache (void) attribute_hidden;
+extern void __wait_lookup_done (void) attribute_hidden;
+
#ifdef SHARED
# define PTHREAD_STATIC_FN_REQUIRE(name)
#else
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/alpha/tls.h new/nptl/sysdeps/alpha/tls.h
--- old/nptl/sysdeps/alpha/tls.h 2007-05-18 10:39:50.000000000 +0200
+++ new/nptl/sysdeps/alpha/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/Alpha version.
- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -121,6 +121,29 @@
#define THREAD_SETMEM_NC(descr, member, idx, value) \
descr->member[idx] = (value)
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/i386/tls.h new/nptl/sysdeps/i386/tls.h
--- old/nptl/sysdeps/i386/tls.h 2007-05-18 10:39:51.000000000 +0200
+++ new/nptl/sysdeps/i386/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/i386 version.
- 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.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,6 +51,7 @@
uintptr_t sysinfo;
uintptr_t stack_guard;
uintptr_t pointer_guard;
+ int gscope_flag;
} tcbhead_t;
# define TLS_MULTIPLE_THREADS_IN_TCB 1
@@ -431,6 +432,26 @@
= THREAD_GETMEM (THREAD_SELF, header.pointer_guard))
+/* Get and set the global scope generation counter in the TCB head. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res; \
+ asm volatile ("xchgl %0, %%gs:%P1" \
+ : "=r" (__res) \
+ : "i" (offsetof (struct pthread, header.gscope_flag)), \
+ "0" (THREAD_GSCOPE_FLAG_UNUSED)); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/ia64/tls.h new/nptl/sysdeps/ia64/tls.h
--- old/nptl/sysdeps/ia64/tls.h 2007-05-18 10:39:51.000000000 +0200
+++ new/nptl/sysdeps/ia64/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/IA-64 version.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -163,6 +163,29 @@
(((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-2] \
= THREAD_GET_POINTER_GUARD ())
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/powerpc/tls.h new/nptl/sysdeps/powerpc/tls.h
--- old/nptl/sysdeps/powerpc/tls.h 2007-05-18 10:39:53.000000000 +0200
+++ new/nptl/sysdeps/powerpc/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/PowerPC version.
- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -180,6 +180,29 @@
different value to mean unset l_tls_offset. */
# define NO_TLS_OFFSET -1
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/s390/tls.h new/nptl/sysdeps/s390/tls.h
--- old/nptl/sysdeps/s390/tls.h 2007-05-18 10:39:56.000000000 +0200
+++ new/nptl/sysdeps/s390/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/s390 version.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,6 +50,7 @@
int multiple_threads;
uintptr_t sysinfo;
uintptr_t stack_guard;
+ int gscope_flag;
} tcbhead_t;
# ifndef __s390x__
@@ -168,6 +169,29 @@
#define THREAD_SET_POINTER_GUARD(value)
#define THREAD_COPY_POINTER_GUARD(descr)
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/sh/tls.h new/nptl/sysdeps/sh/tls.h
--- old/nptl/sysdeps/sh/tls.h 2007-05-18 10:39:56.000000000 +0200
+++ new/nptl/sysdeps/sh/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/SH version.
- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -150,6 +150,29 @@
__asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \
((tcbhead_t *) (descr + 1))->pointer_guard = __tcbp->pointer_guard;})
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/sparc/tls.h new/nptl/sysdeps/sparc/tls.h
--- old/nptl/sysdeps/sparc/tls.h 2007-05-18 10:39:56.000000000 +0200
+++ new/nptl/sysdeps/sparc/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. NPTL/sparc version.
- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -141,6 +141,29 @@
# define THREAD_COPY_POINTER_GUARD(descr) \
((descr)->header.pointer_guard = THREAD_GET_POINTER_GUARD ())
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* !ASSEMBLER */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S new/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
--- old/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2006-04-09 04:42:29.000000000 +0200
+++ new/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2007-07-13 11:56:54.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper , 2002.
@@ -79,10 +79,7 @@
jae 6f
cfi_offset(3, -16) /* %ebx */
-7: call __pthread_enable_asynccancel
- movl %eax, 8(%esp)
-
- xorl %ecx, %ecx
+7: xorl %ecx, %ecx
movl %esp, %ebx
movl %ecx, %edx
movl $SYS_gettimeofday, %eax
@@ -105,6 +102,10 @@
movl %ecx, (%esp) /* Store relative timeout. */
movl %edx, 4(%esp)
+
+ call __pthread_enable_asynccancel
+ movl %eax, 8(%esp)
+
movl 28(%esp), %ebx
xorl %ecx, %ecx
movl %esp, %esi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S new/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
--- old/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2007-05-18 10:40:08.000000000 +0200
+++ new/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2007-07-13 11:56:54.000000000 +0200
@@ -73,10 +73,7 @@
cfi_offset(14, -24) /* %r14 */
jae 6f
-7: call __pthread_enable_asynccancel
- movl %eax, 16(%rsp)
-
- xorl %esi, %esi
+7: xorl %esi, %esi
movq %rsp, %rdi
movq $VSYSCALL_ADDR_vgettimeofday, %rax
callq *%rax
@@ -99,6 +96,9 @@
movq %rdi, (%rsp) /* Store relative timeout. */
movq %rsi, 8(%rsp)
+ call __pthread_enable_asynccancel
+ movl %eax, 16(%rsp)
+
movq %rsp, %r10
movq %r12, %rdi
xorl %esi, %esi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/sysdeps/x86_64/tls.h new/nptl/sysdeps/x86_64/tls.h
--- old/nptl/sysdeps/x86_64/tls.h 2007-05-18 10:40:09.000000000 +0200
+++ new/nptl/sysdeps/x86_64/tls.h 2007-07-13 11:56:54.000000000 +0200
@@ -47,6 +47,7 @@
dtv_t *dtv;
void *self; /* Pointer to the thread descriptor. */
int multiple_threads;
+ int gscope_flag;
uintptr_t sysinfo;
uintptr_t stack_guard;
uintptr_t pointer_guard;
@@ -337,6 +338,26 @@
= THREAD_GETMEM (THREAD_SELF, header.pointer_guard))
+/* Get and set the global scope generation counter in the TCB head. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res; \
+ asm volatile ("xchgl %0, %%fs:%P1" \
+ : "=r" (__res) \
+ : "i" (offsetof (struct pthread, header.gscope_flag)), \
+ "0" (THREAD_GSCOPE_FLAG_UNUSED)); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/tst-robust9.c new/nptl/tst-robust9.c
--- old/nptl/tst-robust9.c 1970-01-01 01:00:00.000000000 +0100
+++ new/nptl/tst-robust9.c 2007-07-13 11:56:53.000000000 +0200
@@ -0,0 +1,94 @@
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+static pthread_mutex_t m;
+
+static void *
+tf (void *data)
+{
+ int err = pthread_mutex_lock (&m);
+ if (err == EOWNERDEAD)
+ {
+ err = pthread_mutex_consistent_np (&m);
+ if (err)
+ {
+ puts ("pthread_mutex_consistent_np");
+ exit (1);
+ }
+ }
+ else if (err)
+ {
+ puts ("pthread_mutex_lock");
+ exit (1);
+ }
+ printf ("thread%ld got the lock.\n", (long int) data);
+ sleep (1);
+ /* exit without unlock */
+ return NULL;
+}
+
+static int
+do_test (void)
+{
+ int err, i;
+ pthread_t t[3];
+ pthread_mutexattr_t ma;
+
+ pthread_mutexattr_init (&ma);
+ err = pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP);
+ if (err)
+ {
+ puts ("pthread_mutexattr_setrobust_np");
+ return 1;
+ }
+#ifdef ENABLE_PI
+ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT) != 0)
+ {
+ puts ("pthread_mutexattr_setprotocol failed");
+ return 1;
+ }
+#endif
+ err = pthread_mutex_init (&m, &ma);
+#ifdef ENABLE_PI
+ if (err == ENOTSUP)
+ {
+ puts ("PI robust mutexes not supported");
+ return 0;
+ }
+#endif
+ if (err)
+ {
+ puts ("pthread_mutex_init");
+ return 1;
+ }
+
+ for (i = 0; i < sizeof (t) / sizeof (t[0]); i++)
+ {
+ err = pthread_create (&t[i], NULL, tf, (void *) (long int) i);
+ if (err)
+ {
+ puts ("pthread_create");
+ return 1;
+ }
+ }
+
+ for (i = 0; i < sizeof (t) / sizeof (t[0]); i++)
+ {
+ err = pthread_join (t[i], NULL);
+ if (err)
+ {
+ puts ("pthread_join");
+ return 1;
+ }
+ }
+ return 0;
+}
+
+#define TIMEOUT 5
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/tst-robustpi9.c new/nptl/tst-robustpi9.c
--- old/nptl/tst-robustpi9.c 1970-01-01 01:00:00.000000000 +0100
+++ new/nptl/tst-robustpi9.c 2007-07-13 11:56:53.000000000 +0200
@@ -0,0 +1,2 @@
+#define ENABLE_PI 1
+#include "tst-robust9.c"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/tst-sem10.c new/nptl/tst-sem10.c
--- old/nptl/tst-sem10.c 1970-01-01 01:00:00.000000000 +0100
+++ new/nptl/tst-sem10.c 2007-07-13 11:56:53.000000000 +0200
@@ -0,0 +1,88 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek , 2007.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+static int
+do_test (void)
+{
+ sem_t s;
+ if (sem_init (&s, 0, 0) == -1)
+ {
+ puts ("sem_init failed");
+ return 1;
+ }
+
+ struct timeval tv;
+ if (gettimeofday (&tv, NULL) != 0)
+ {
+ puts ("gettimeofday failed");
+ return 1;
+ }
+
+ struct timespec ts;
+ TIMEVAL_TO_TIMESPEC (&tv, &ts);
+
+ /* Set ts to yesterday. */
+ ts.tv_sec -= 86400;
+
+ int type_before;
+ if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &type_before) != 0)
+ {
+ puts ("first pthread_setcanceltype failed");
+ return 1;
+ }
+
+ errno = 0;
+ if (TEMP_FAILURE_RETRY (sem_timedwait (&s, &ts)) != -1)
+ {
+ puts ("sem_timedwait succeeded");
+ return 1;
+ }
+ if (errno != ETIMEDOUT)
+ {
+ printf ("sem_timedwait return errno = %d instead of ETIMEDOUT\n",
+ errno);
+ return 1;
+ }
+
+ int type_after;
+ if (pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &type_after) != 0)
+ {
+ puts ("second pthread_setcanceltype failed");
+ return 1;
+ }
+ if (type_after != PTHREAD_CANCEL_DEFERRED)
+ {
+ puts ("sem_timedwait changed cancellation type");
+ return 1;
+ }
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
++++++ glibc_post_upgrade.c ++++++
--- glibc/glibc_post_upgrade.c 2007-06-07 02:44:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/glibc/glibc_post_upgrade.c 2007-07-13 19:09:05.000000000 +0200
@@ -42,6 +42,23 @@
#ifdef __i386__
"/lib/i686/",
#endif
+#ifdef REMOVE_PPC_OPTIMIZE_DIRS
+#ifdef __powerpc64__
+ "/lib64/power4/",
+ "/lib64/power5/",
+ "/lib64/power5+/",
+ "/lib64/power6/",
+ "/lib64/power6x/",
+ "/lib64/ppc970/",
+#else
+ "/lib/power4/",
+ "/lib/power5/",
+ "/lib/power5+/",
+ "/lib/power6/",
+ "/lib/power6x/",
+ "/lib/ppc970/",
+#endif
+#endif
LIBDIR"/tls/" };
int i, j;
@@ -49,7 +66,7 @@
for (j = 0; j < sizeof (library) / sizeof (library[0]); j++)
{
char buf[strlen (remove_dir[i]) + strlen (library[j]) + 1];
- char readlink_buf[strlen (remove_dir[i]) + strlen (library[j]) + 30];
+ char readlink_buf[(strlen (remove_dir[i]) + strlen (library[j])) * 2 + 30];
ssize_t len;
char *cp;
@@ -57,11 +74,13 @@
strcpy (cp, library[j]);
/* This file could be a symlink to library-%{version}.so, so check
this and don't remove only the link, but also the library itself. */
- if ((len = readlink (buf, readlink_buf, sizeof (readlink_buf) - 1))
- != -1)
+ cp = stpcpy (readlink_buf, remove_dir[i]);
+ if ((len = readlink (buf, cp, (sizeof (readlink_buf)
+ - (cp - readlink_buf) - 1))) > 0)
{
- readlink_buf[len] = '\0';
- unlink (readlink_buf);
+ cp[len] = '\0';
+ if (cp[0] != '/') cp = readlink_buf;
+ unlink (cp);
}
unlink (buf);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org