[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r2394 - in /trunk/libc: ./ crypt/ debug/ include/ include/bits/ io/ io/bits/ nptl/ nptl/sysdeps/alpha/ nptl/sysdeps/i386/ np...
- To: commits@xxxxxxxxxx
- Subject: [commits] r2394 - in /trunk/libc: ./ crypt/ debug/ include/ include/bits/ io/ io/bits/ nptl/ nptl/sysdeps/alpha/ nptl/sysdeps/i386/ np...
- From: joseph@xxxxxxxxxx
- Date: Mon, 04 Jun 2007 20:34:59 -0000
Author: joseph
Date: Mon Jun 4 13:34:58 2007
New Revision: 2394
Log:
Merge changes between r2277 and r2393 from /fsf/trunk.
Added:
trunk/libc/debug/fortify_fail.c
- copied unchanged from r2393, fsf/trunk/libc/debug/fortify_fail.c
trunk/libc/include/bits/fcntl2.h
- copied unchanged from r2393, fsf/trunk/libc/include/bits/fcntl2.h
trunk/libc/io/bits/
- copied from r2393, fsf/trunk/libc/io/bits/
trunk/libc/nptl/sysdeps/unix/sysv/linux/structsem.sym
- copied unchanged from r2393, fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/structsem.sym
trunk/libc/nptl/tst-sem10.c
- copied unchanged from r2393, fsf/trunk/libc/nptl/tst-sem10.c
trunk/libc/nptl/tst-sem11.c
- copied unchanged from r2393, fsf/trunk/libc/nptl/tst-sem11.c
trunk/libc/nptl/tst-sem12.c
- copied unchanged from r2393, fsf/trunk/libc/nptl/tst-sem12.c
trunk/libc/sysdeps/powerpc/powerpc32/970/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc32/970/
trunk/libc/sysdeps/powerpc/powerpc32/power4/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power4/
trunk/libc/sysdeps/powerpc/powerpc32/power5/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power5/
trunk/libc/sysdeps/powerpc/powerpc32/power5+/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power5+/
trunk/libc/sysdeps/powerpc/powerpc32/power6/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power6/
trunk/libc/sysdeps/powerpc/powerpc32/power6x/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power6x/
trunk/libc/sysdeps/powerpc/powerpc64/970/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc64/970/
trunk/libc/sysdeps/powerpc/powerpc64/power4/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power4/
trunk/libc/sysdeps/powerpc/powerpc64/power5/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power5/
trunk/libc/sysdeps/powerpc/powerpc64/power5+/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power5+/
trunk/libc/sysdeps/powerpc/powerpc64/power6/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/
trunk/libc/sysdeps/powerpc/powerpc64/power6x/
- copied from r2393, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6x/
trunk/libc/sysdeps/unix/sysv/linux/open_2.c
- copied unchanged from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/open_2.c
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/970/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/970/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/970/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/970/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/
- copied from r2393, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/
Modified:
trunk/libc/ChangeLog
trunk/libc/Makerules
trunk/libc/Versions.def
trunk/libc/crypt/md5-crypt.c
trunk/libc/debug/Makefile
trunk/libc/debug/chk_fail.c
trunk/libc/debug/stack_chk_fail.c
trunk/libc/include/fcntl.h
trunk/libc/include/stdio.h
trunk/libc/io/Versions
trunk/libc/io/fcntl.h
trunk/libc/io/open.c
trunk/libc/io/open64.c
trunk/libc/io/openat.c
trunk/libc/io/openat64.c
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/Makefile
trunk/libc/nptl/allocatestack.c
trunk/libc/nptl/descr.h
trunk/libc/nptl/init.c
trunk/libc/nptl/pthreadP.h
trunk/libc/nptl/pthread_barrier_init.c
trunk/libc/nptl/pthread_cond_destroy.c
trunk/libc/nptl/pthread_cond_init.c
trunk/libc/nptl/pthread_cond_timedwait.c
trunk/libc/nptl/pthread_cond_wait.c
trunk/libc/nptl/pthread_condattr_getclock.c
trunk/libc/nptl/pthread_condattr_setclock.c
trunk/libc/nptl/pthread_getattr_np.c
trunk/libc/nptl/pthread_getschedparam.c
trunk/libc/nptl/pthread_rwlock_init.c
trunk/libc/nptl/pthread_rwlock_rdlock.c
trunk/libc/nptl/pthread_rwlock_timedrdlock.c
trunk/libc/nptl/pthread_rwlock_tryrdlock.c
trunk/libc/nptl/pthread_setschedparam.c
trunk/libc/nptl/pthread_setschedprio.c
trunk/libc/nptl/sem_getvalue.c
trunk/libc/nptl/sem_init.c
trunk/libc/nptl/sem_open.c
trunk/libc/nptl/semaphoreP.h
trunk/libc/nptl/sysdeps/alpha/tls.h
trunk/libc/nptl/sysdeps/i386/tls.h
trunk/libc/nptl/sysdeps/ia64/tls.h
trunk/libc/nptl/sysdeps/powerpc/tcb-offsets.sym
trunk/libc/nptl/sysdeps/powerpc/tls.h
trunk/libc/nptl/sysdeps/pthread/pthread.h
trunk/libc/nptl/sysdeps/s390/tls.h
trunk/libc/nptl/sysdeps/sh/tls.h
trunk/libc/nptl/sysdeps/sparc/tls.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/Makefile
trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/internaltypes.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.sym
trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelcond.sym
trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/lowlevelrwlock.sym
trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_post.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sem_wait.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
trunk/libc/nptl/sysdeps/x86_64/tls.h
trunk/libc/nptl/tst-initializers1.c
trunk/libc/nptl/tst-typesizes.c
trunk/libc/nscd/nscd_helper.c
trunk/libc/po/Makefile
trunk/libc/sysdeps/unix/sysv/linux/Makefile
trunk/libc/sysdeps/unix/sysv/linux/futimes.c
trunk/libc/sysdeps/unix/sysv/linux/open64.c
trunk/libc/sysdeps/unix/sysv/linux/openat.c
trunk/libc/sysdeps/unix/sysv/linux/openat64.c
trunk/libc/sysdeps/unix/sysv/linux/powerpc/libc-start.c
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Mon Jun 4 13:34:58 2007
@@ -1,3 +1,283 @@
+2007-05-31 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/970/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power5/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power6/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power6x/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc64/970/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power5/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power6/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power6x/fpu/Implies: New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/970/fpu/Implies: New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/power4/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/power5/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/power5+/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/power6/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/power6x/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/970/fpu/Implies: New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/fpu/Implies:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/fpu/Implies:
+ New file.
+
+2007-05-31 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S: Move.
+ * sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: To here.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrintf.S: Move.
+ * sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: To here.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llround.S: Move.
+ * sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S: To here.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llroundf.S: Move.
+ * sysdeps/powerpc/powerpc32/power4/fpu/s_llroundf.S: To here.
+
+2007-05-22 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S
+ (LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S
+ (LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S
+ (LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S
+ (LONG_DOUBLE_COMPAT): Specify correct version, GLIBC_2_1.
+
+2007-05-21 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power4/fpu/slowexp.c: New file.
+ * sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.c: New file.
+ * sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c: New file.
+ * sysdeps/powerpc/powerpc64/power4/fpu/w_sqrt.c: New file.
+
+2007-03-15 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S
+ [LONG_DOUBLE_COMPAT]: Add compat_symbol for llrintl@@GLIBC_2_1.
+
+2006-02-13 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: New File
+ * sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: New File
+ * sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S: New File
+ * sysdeps/powerpc/powerpc32/power6/fpu/s_llroundf.S: New File
+
+2006-10-20 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power4/fpu/slowpow.c: New file.
+ * sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c: New file.
+
+2006-10-03 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llround.S: New file.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llroundf.S: New file.
+
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/Makefile: Moved.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/mpa.c: Likewise.
+ * sysdeps/powerpc/powerpc32/power4/fpu/Makefile: To here.
+ * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c: Likewise.
+
+2006-09-29 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S: New file.
+ * sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S: New file.
+ * sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: New file.
+ * sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: New file.
+
+2006-09-28 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_llroundf.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S: New file.
+ * sysdeps/powerpc/powerpc32/power6x/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: New file.
+ * sysdeps/powerpc/powerpc64/power6x/fpu/Implies: New file.
+
+2006-08-31 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/Makefile: New file.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/mpa.c: New file.
+ * sysdeps/powerpc/powerpc64/power4/fpu/Makefile: New file.
+ * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c: New file.
+
+2006-06-15 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S: New file.
+ * sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: New file.
+ * sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: New file.
+
+2006-03-20 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S: New file.
+ * sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrintf.S: New file.
+
+2007-06-01 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power6/memset.S: New file.
+ * sysdeps/powerpc/powerpc64/power6/memset.S: New file.
+
+2007-05-31 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/970/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power5/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power5+/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power6/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power6x/Implies: New file.
+ * sysdeps/powerpc/powerpc64/970/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power5/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power5+/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power6/Implies: New file.
+ * sysdeps/powerpc/powerpc64/power6x/Implies: New file.
+
+2007-05-21 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power4/memset.S: New file
+
+2007-03-13 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/memcpy.S: Improve aligned loop to minimize
+ branch miss-predicts. Ensure that cache line crossing does not impact
+ dispatch grouping.
+
+2006-12-13 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/power4/memcopy.h: Replace with include
+ "../../powerpc32/power4/memcopy.h".
+ * sysdeps/powerpc/powerpc64/power4/wordcopy.c: Replace with include
+ "../../powerpc32/power4/wordcopy.c".
+
+2006-10-03 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/powerpc64/Makefile: Moved.
+ * sysdeps/powerpc/powerpc32/powerpc64/memcopy.h: Likewise.
+ * sysdeps/powerpc/powerpc32/powerpc64/wordcopy.c: Likewise.
+ * sysdeps/powerpc/powerpc32/power4/Makefile: To here.
+ * sysdeps/powerpc/powerpc32/power4/memcopy.h: Likewise.
+ * sysdeps/powerpc/powerpc32/power4/wordcopy.c: Likewise.
+
+2006-09-10 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power6/memcpy.S: New file.
+
+2006-08-31 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power6/wordcopy.c: New file.
+ * sysdeps/powerpc/powerpc32/powerpc64/Makefile: New file.
+ * sysdeps/powerpc/powerpc32/powerpc64/memcopy.h: New file.
+ * sysdeps/powerpc/powerpc32/powerpc64/wordcopy.c: New file.
+ * sysdeps/powerpc/powerpc64/power4/Makefile: New file.
+ * sysdeps/powerpc/powerpc64/power4/memcopy.h: New file.
+ * sysdeps/powerpc/powerpc64/power4/wordcopy.c: New file.
+ * sysdeps/powerpc/powerpc64/power6/wordcopy.c: New file.
+
+2006-07-06 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/power6/memcpy.S: New file.
+
+2006-03-20 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power4/memcmp.S: New file.
+ * sysdeps/powerpc/powerpc32/power4/memcpy.S: New file.
+ * sysdeps/powerpc/powerpc32/power4/memset.S: New file.
+ * sysdeps/powerpc/powerpc32/power4/strncmp.S: New file.
+ * sysdeps/powerpc/powerpc64/power4/memcmp.S: New file.
+ * sysdeps/powerpc/powerpc64/power4/memcpy.S: New file.
+ * sysdeps/powerpc/powerpc64/power4/strncmp.S: New file.
+
+2007-05-29 Roland McGrath <roland@xxxxxxxxxx>
+
+ * po/Makefile (po-sed-cmd): New variable.
+ (libc.pot.files): Move sed command text in there, avoid \ inside ''.
+
+2007-05-29 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * crypt/md5-crypt.c: Fix comment.
+
+ * nscd/nscd_helper.c (get_mapping): Handle short replies instead
+ of crashing. When this is the case or if the reply is malformed,
+ don't try to close the new file descriptor since it does not
+ exist.
+ Patch in part by Guillaume Chazarain <guichaz@xxxxxxxx>.
+
+2007-05-28 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/futimes.c (miss_utimensat): Don't define
+ if __NR_utimensat is not defined.
+
+2007-05-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/powerpc/libc-start.c: Include <sysdep.h>.
+
+2007-05-25 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * io/bits/fcntl2.h (__open_2): Add nonnull attribute.
+ (open): Fix comment typos. Don't call __open_2 if flags
+ is a compile time constant without O_CREAT.
+ (__open64_2): Add nonnull attribute.
+ (open64): Fix comment typos. Don't call __open64_2 if flags
+ is a compile time constant without O_CREAT.
+ (__openat_2): Add nonnull attribute, fix nonnull attribute
+ on redirect.
+ (openat): Fix comment typos. Don't call __openat_2 if flags
+ is a compile time constant without O_CREAT.
+ (__openat64_2): Add nonnull attribute, fix nonnull attribute
+ on redirect.
+ (openat64): Fix comment typos. Don't call __openat64_2 if flags
+ is a compile time constant without O_CREAT.
+
+2007-05-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * Makerules (sysd-rules): Define PTW for ptw-* files.
+ * Versions: Define GLIBC_2.7 for libc.
+ * include/stdio.h: Declare __fortify_fail.
+ * debug/fortify_fail.c: New file.
+ * debug/Makefile (routines): Add fortify_fail.
+ * debug/chk_fail.c: Use __fortify_fail.
+ * debug/stack_chk_fail.c: Likewise.
+ * io/Versions: Export __open_2, __open64_2, __openat_2, and
+ __openat64_2 for GLIBC_2.7.
+ * io/fcntl.h: When compiling with fortification, include bits/fcntl2.h.
+ * io/open.c: Define *_2 variant of function which checks for O_CREAT
+ and fails if necessary.
+ * io/open64.c: Likewise.
+ * io/openat.c: Likewise.
+ * io/openat64.c: Likewise.
+ * sysdeps/unix/sysv/linux/open64.c: Likewise.
+ * sysdeps/unix/sysv/linux/openat.c: Likewise.
+ * sysdeps/unix/sysv/linux/openat64.c: Likewise.
+ * io/bits/fcntl2.h: New file.
+ * include/fcntl.h: Declare __open_2, __open64_2, __openat_2, and
+ __openat64_2.
+ * include/bits/fcntl2.h: New file.
+ * sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines):
+ Add open_2.
+ * sysdeps/unix/sysv/linux/open_2.c: New file.
+
2007-05-21 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Pass correct value
Modified: trunk/libc/Makerules
==============================================================================
--- trunk/libc/Makerules (original)
+++ trunk/libc/Makerules Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright (C) 1991-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
@@ -240,9 +240,9 @@
echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
\$$(compile-command.s)"; \
echo "\$$(objpfx)ptw-%$$o: $$dir/%.S \$$(before-compile); \
- \$$(compile-command.S)"; \
+ \$$(compile-command.S) -DPTW"; \
echo "\$$(objpfx)ptw-%$$o: $$dir/%.s \$$(before-compile); \
- \$$(compile-command.s)"; \
+ \$$(compile-command.s) -DPTW"; \
echo "\$$(objpfx)m_%$$o: $$dir/s_%.S \$$(before-compile); \
\$$(compile-command.S)"; \
echo "\$$(objpfx)m_%$$o: $$dir/s_%.s \$$(before-compile); \
@@ -253,7 +253,7 @@
echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
\$$(compile-command.c)"; \
echo "\$$(objpfx)ptw-%$$o: $$dir/%.c \$$(before-compile); \
- \$$(compile-command.c)"; \
+ \$$(compile-command.c) -DPTW"; \
echo "\$$(objpfx)m_%$$o: $$dir/s_%.c \$$(before-compile); \
\$$(compile-command.c)"; \
done; \
Modified: trunk/libc/Versions.def
==============================================================================
--- trunk/libc/Versions.def (original)
+++ trunk/libc/Versions.def Mon Jun 4 13:34:58 2007
@@ -23,6 +23,7 @@
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
+ GLIBC_2.7
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
Modified: trunk/libc/crypt/md5-crypt.c
==============================================================================
--- trunk/libc/crypt/md5-crypt.c (original)
+++ trunk/libc/crypt/md5-crypt.c Mon Jun 4 13:34:58 2007
@@ -106,7 +106,7 @@
/* The last part is the salt string. This must be at most 8
characters and it ends at the first `$' character (for
- compatibility which existing solutions). */
+ compatibility with existing implementations). */
__md5_process_bytes (salt, salt_len, &ctx);
Modified: trunk/libc/debug/Makefile
==============================================================================
--- trunk/libc/debug/Makefile (original)
+++ trunk/libc/debug/Makefile Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2001,2004,2005,2006 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001,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
@@ -42,7 +42,7 @@
gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
wcstombs_chk \
- stack_chk_fail \
+ stack_chk_fail fortify_fail \
$(static-only-routines)
static-only-routines := warning-nop stack_chk_fail_local
Modified: trunk/libc/debug/chk_fail.c
==============================================================================
--- trunk/libc/debug/chk_fail.c (original)
+++ trunk/libc/debug/chk_fail.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 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
@@ -26,9 +26,6 @@
__attribute__ ((noreturn))
__chk_fail (void)
{
- /* The loop is added only to keep gcc happy. */
- while (1)
- __libc_message (2, "*** buffer overflow detected ***: %s terminated\n",
- __libc_argv[0] ?: "<unknown>");
+ __fortify_fail ("buffer overflow detected");
}
libc_hidden_def (__chk_fail)
Modified: trunk/libc/debug/stack_chk_fail.c
==============================================================================
--- trunk/libc/debug/stack_chk_fail.c (original)
+++ trunk/libc/debug/stack_chk_fail.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 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
@@ -26,8 +26,5 @@
__attribute__ ((noreturn))
__stack_chk_fail (void)
{
- /* The loop is added only to keep gcc happy. */
- while (1)
- __libc_message (1, "*** stack smashing detected ***: %s terminated\n",
- __libc_argv[0] ?: "<unknown>");
+ __fortify_fail ("stack smashing detected");
}
Modified: trunk/libc/include/fcntl.h
==============================================================================
--- trunk/libc/include/fcntl.h (original)
+++ trunk/libc/include/fcntl.h Mon Jun 4 13:34:58 2007
@@ -24,6 +24,11 @@
__nonnull ((2));
libc_hidden_proto (__openat64)
+extern int __open_2 (__const char *__path, int __oflag);
+extern int __open64_2 (__const char *__path, int __oflag);
+extern int __openat_2 (int __fd, __const char *__path, int __oflag);
+extern int __openat64_2 (int __fd, __const char *__path, int __oflag);
+
/* Helper functions for the various *at functions. For Linux. */
extern void __atfct_seterrno (int errval, int fd, const char *buf)
Modified: trunk/libc/include/stdio.h
==============================================================================
--- trunk/libc/include/stdio.h (original)
+++ trunk/libc/include/stdio.h Mon Jun 4 13:34:58 2007
@@ -65,6 +65,7 @@
extern void __libc_fatal (__const char *__message)
__attribute__ ((__noreturn__));
extern void __libc_message (int do_abort, __const char *__fnt, ...);
+extern void __fortify_fail (const char *msg) __attribute__ ((noreturn));
/* Acquire ownership of STREAM. */
extern void __flockfile (FILE *__stream);
Modified: trunk/libc/io/Versions
==============================================================================
--- trunk/libc/io/Versions (original)
+++ trunk/libc/io/Versions Mon Jun 4 13:34:58 2007
@@ -116,4 +116,7 @@
GLIBC_2.6 {
utimensat; futimens;
}
+ GLIBC_2.7 {
+ __open_2; __open64_2; __openat_2; __openat64_2;
+ }
}
Modified: trunk/libc/io/fcntl.h
==============================================================================
--- trunk/libc/io/fcntl.h (original)
+++ trunk/libc/io/fcntl.h Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -210,6 +210,12 @@
# endif
#endif
+
+/* Define some macros helping to catch common problems. */
+#if __USE_FORTIFY_LEVEL > 0 && !defined __cplusplus
+# include <bits/fcntl2.h>
+#endif
+
__END_DECLS
#endif /* fcntl.h */
Modified: trunk/libc/io/open.c
==============================================================================
--- trunk/libc/io/open.c (original)
+++ trunk/libc/io/open.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1997,2002,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
@@ -20,6 +20,9 @@
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
+
+extern char **__libc_argv attribute_hidden;
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
@@ -51,4 +54,18 @@
stub_warning (open)
weak_alias (__open, open)
+
+
+int
+__open_2 (file, oflag)
+ const char *file;
+ int oflag;
+{
+ if (oflag & O_CREAT)
+ __fortify_fail ("invalid open call: O_CREAT without mode");
+
+ return __open (file, oflag);
+}
+stub_warning (__open_2)
+
#include <stub-tag.h>
Modified: trunk/libc/io/open64.c
==============================================================================
--- trunk/libc/io/open64.c (original)
+++ trunk/libc/io/open64.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1999, 2000, 2002
+/* Copyright (C) 1991, 1995, 1996, 1997, 1999, 2000, 2002, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -21,7 +21,7 @@
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
-#include <bp-sym.h>
+#include <stdio.h>
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
@@ -51,7 +51,21 @@
}
strong_alias (__libc_open64, __open64)
libc_hidden_def (__open64)
-weak_alias (__libc_open64, BP_SYM (open64))
+weak_alias (__libc_open64, open64)
stub_warning (open64)
+
+
+int
+__open64_2 (file, oflag)
+ const char *file;
+ int oflag;
+{
+ if (oflag & O_CREAT)
+ __fortify_fail ("invalid open64 call: O_CREAT without mode");
+
+ return __open64 (file, oflag);
+}
+stub_warning (__open64_2)
+
#include <stub-tag.h>
Modified: trunk/libc/io/openat.c
==============================================================================
--- trunk/libc/io/openat.c (original)
+++ trunk/libc/io/openat.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <sys/stat.h>
/* Open FILE with access OFLAG. Interpret relative paths relative to
@@ -68,4 +69,18 @@
weak_alias (__openat, openat)
stub_warning (openat)
+
+int
+__openat_2 (fd, file, oflag)
+ int fd;
+ const char *file;
+ int oflag;
+{
+ if (oflag & O_CREAT)
+ __fortify_fail ("invalid openat call: O_CREAT without mode");
+
+ return __openat (file, oflag);
+}
+stub_warning (__openat_2)
+
#include <stub-tag.h>
Modified: trunk/libc/io/openat64.c
==============================================================================
--- trunk/libc/io/openat64.c (original)
+++ trunk/libc/io/openat64.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 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
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <sys/stat.h>
/* Open FILE with access OFLAG. Interpret relative paths relative to
@@ -68,4 +69,18 @@
weak_alias (__openat64, openat64)
stub_warning (openat64)
+
+int
+__openat64_2 (fd, file, oflag)
+ int fd;
+ const char *file;
+ int oflag;
+{
+ if (oflag & O_CREAT)
+ __fortify_fail ("invalid openat64 call: O_CREAT without mode");
+
+ return __openat64 (file, oflag);
+}
+stub_warning (__openat_2)
+
#include <stub-tag.h>
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Mon Jun 4 13:34:58 2007
@@ -1,3 +1,220 @@
+2007-05-29 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * pthread_getattr_np.c: No need to install a cancellation handler,
+ this is no cancellation point.
+ * pthread_getschedparam.c: Likewise.
+ * pthread_setschedparam.c: Likewise.
+ * pthread_setschedprio.c: Likewise.
+ * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
+ lll_unlock_wake_cb.
+ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
+
+ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
+ whether there are more than one thread makes no sense here since
+ we only call the slow path if the locks are taken.
+ * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
+
+ * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
+ COND_NWAITERS_SHIFT.
+ * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
+ COND_CLOCK_BITS.
+ * pthread_cond_init.c: Likewise.
+ * pthread_cond_timedwait.c: Likewise.
+ * pthread_cond_wait.c: Likewise.
+ * pthread_condattr_getclock.c: Likewise.
+ * pthread_condattr_setclock.c: Likewise.
+ * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+
+2007-05-28 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
+ unistd.h.
+
+ * 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 <rth@xxxxxxxxxx>
+
+ * 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-27 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * init.c: Make it compile with older kernel headers.
+
+ * tst-initializers1.c: Show through exit code which test failed.
+
+ * pthread_rwlock_init.c: Also initialize __shared field.
+ * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
+ element in rwlock structure into four byte elements. One of them is
+ the new __shared element.
+ * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
+ Likewise.
+ [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
+ __shared, adjust names of other padding elements.
+ * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
+ * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
+ * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
+ FUTEX_PRIVATE_FLAG.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
+ futex to use private operations if possible.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
+
+2007-05-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
+ * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
+ * pthread_rwlock_timedrdlock.c: Likewise.
+ * pthread_rwlock_tryrdlock.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
+ optimization.
+
+ * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
+ * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
+ duplication of __sem_wait_cleanup.
+
+ * allocatestack.c: Revert last change.
+ * init.c: Likewise.
+ * sysdeps/i386/tls.h: Likewise.
+ * sysdeps/x86_64/tls.h: Likewise.
+ * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
+ header structure.
+ * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
+
+ * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
+ Add private field.
+ * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
+ * pthread_barrier_init.c: Set private flag if pshared and private
+ futexes are supported.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
+ private field in futex command setup.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
+
+2007-05-25 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
+ support.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
+
+ * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
+ * sem_init.c (__new_sem_init): Rewrite to initialize all three
+ fields in the structure.
+ (__old_sem_init): New function.
+ * sem_open.c: Initialize all fields of the structure.
+ * sem_getvalue.c: Adjust for renamed element.
+ * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
+ (gen-as-const-headers): Add structsem.sym.
+ * sysdeps/unix/sysv/linux/structsem.sym: New file.
+ * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
+ struct new_sem. Add struct old_sem.
+ * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
+ * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
+ * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
+ * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
+ * tst-sem10.c: New file.
+ * tst-sem11.c: New file.
+ * tst-sem12.c: New file.
+ * tst-typesizes.c: Test struct new_sem and struct old_sem instead
+ of struct sem.
+
+2007-05-25 Ulrich Drepper <drepper@xxxxxxxxxx>
+ Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * 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-24 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
+ THREAD_COPY_PRIVATE_FUTEX): Define.
+ * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
+ THREAD_COPY_PRIVATE_FUTEX): Define.
+ * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
+ * init.c (__pthread_initialize_minimal_internal): Use
+ THREAD_SET_PRIVATE_FUTEX.
+
+ * 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-23 Ulrich Drepper <drepper@xxxxxxxxxx>
* init.c (__pthread_initialize_minimal_internal): Check whether
Modified: trunk/libc/nptl/Makefile
==============================================================================
--- trunk/libc/nptl/Makefile (original)
+++ trunk/libc/nptl/Makefile Mon Jun 4 13:34:58 2007
@@ -225,7 +225,7 @@
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-sem11 tst-sem12 \
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 \
Modified: trunk/libc/nptl/allocatestack.c
==============================================================================
--- trunk/libc/nptl/allocatestack.c (original)
+++ trunk/libc/nptl/allocatestack.c Mon Jun 4 13:34:58 2007
@@ -516,11 +516,9 @@
__pthread_multiple_threads = *__libc_multiple_threads_ptr = 1;
#endif
-#ifndef __ASSUME_PRIVATE_FUTEX
/* The thread must know when private futexes are supported. */
pd->header.private_futex = THREAD_GETMEM (THREAD_SELF,
- header.private_futex);
-#endif
+ header.private_futex);
#ifdef NEED_DL_SYSINFO
/* Copy the sysinfo value from the parent. */
Modified: trunk/libc/nptl/descr.h
==============================================================================
--- trunk/libc/nptl/descr.h (original)
+++ trunk/libc/nptl/descr.h Mon Jun 4 13:34:58 2007
@@ -37,6 +37,7 @@
#endif
#define __need_res_state
#include <resolv.h>
+#include <kernel-features.h>
#ifndef TCB_ALIGNMENT
# define TCB_ALIGNMENT sizeof (double)
@@ -131,6 +132,10 @@
struct
{
int multiple_threads;
+ int gscope_flag;
+# ifndef __ASSUME_PRIVATE_FUTEX
+ int private_futex;
+# endif
} header;
#endif
Modified: trunk/libc/nptl/init.c
==============================================================================
--- trunk/libc/nptl/init.c (original)
+++ trunk/libc/nptl/init.c Mon Jun 4 13:34:58 2007
@@ -281,9 +281,9 @@
doing the test once this early is beneficial. */
{
int word;
- res = INTERNAL_SYSCALL (futex, err, 3, &word,
+ word = INTERNAL_SYSCALL (futex, err, 3, &word,
FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1);
- if (!INTERNAL_SYSCALL_ERROR_P (res, err))
+ if (!INTERNAL_SYSCALL_ERROR_P (word, err))
THREAD_SETMEM (pd, header.private_futex, FUTEX_PRIVATE_FLAG);
}
#endif
Modified: trunk/libc/nptl/pthreadP.h
==============================================================================
--- trunk/libc/nptl/pthreadP.h (original)
+++ trunk/libc/nptl/pthreadP.h Mon Jun 4 13:34:58 2007
@@ -116,6 +116,11 @@
#define PTHREAD_MUTEXATTR_FLAG_BITS \
(PTHREAD_MUTEXATTR_FLAG_ROBUST | PTHREAD_MUTEXATTR_FLAG_PSHARED \
| PTHREAD_MUTEXATTR_PROTOCOL_MASK | PTHREAD_MUTEXATTR_PRIO_CEILING_MASK)
+
+
+/* Check whether rwlock prefers readers. */
+#define PTHREAD_RWLOCK_PREFER_READER_P(rwlock) \
+ ((rwlock)->__data.__flags == 0)
/* Bits used in robust mutex implementation. */
Modified: trunk/libc/nptl/pthread_barrier_init.c
==============================================================================
--- trunk/libc/nptl/pthread_barrier_init.c (original)
+++ trunk/libc/nptl/pthread_barrier_init.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -20,6 +20,13 @@
#include <errno.h>
#include "pthreadP.h"
#include <lowlevellock.h>
+#include <kernel-features.h>
+
+
+static const struct pthread_barrierattr default_attr =
+ {
+ .pshared = PTHREAD_PROCESS_PRIVATE
+ };
int
@@ -33,17 +40,15 @@
if (__builtin_expect (count == 0, 0))
return EINVAL;
- if (attr != NULL)
- {
- struct pthread_barrierattr *iattr;
+ struct pthread_barrierattr *iattr
+ = (attr != NULL
+ ? iattr = (struct pthread_barrierattr *) attr
+ : &default_attr);
- iattr = (struct pthread_barrierattr *) attr;
-
- if (iattr->pshared != PTHREAD_PROCESS_PRIVATE
- && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0))
- /* Invalid attribute. */
- return EINVAL;
- }
+ if (iattr->pshared != PTHREAD_PROCESS_PRIVATE
+ && __builtin_expect (iattr->pshared != PTHREAD_PROCESS_SHARED, 0))
+ /* Invalid attribute. */
+ return EINVAL;
ibarrier = (struct pthread_barrier *) barrier;
@@ -53,5 +58,14 @@
ibarrier->init_count = count;
ibarrier->curr_event = 0;
+#ifdef __ASSUME_PRIVATE_FUTEX
+ ibarrier->private = (iattr->pshared != PTHREAD_PROCESS_PRIVATE
+ ? 0 : FUTEX_PRIVATE_FLAG);
+#else
+ ibarrier->private = (iattr->pshared != PTHREAD_PROCESS_PRIVATE
+ ? 0 : THREAD_GETMEM (THREAD_SELF,
+ header.private_futex));
+#endif
+
return 0;
}
Modified: trunk/libc/nptl/pthread_cond_destroy.c
==============================================================================
--- trunk/libc/nptl/pthread_cond_destroy.c (original)
+++ trunk/libc/nptl/pthread_cond_destroy.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -45,7 +45,7 @@
pthread_cond_destroy needs to wait for them. */
unsigned int nwaiters = cond->__data.__nwaiters;
- if (nwaiters >= (1 << COND_CLOCK_BITS))
+ if (nwaiters >= (1 << COND_NWAITERS_SHIFT))
{
/* Wake everybody on the associated mutex in case there are
threads that have been requeued to it.
@@ -72,7 +72,7 @@
nwaiters = cond->__data.__nwaiters;
}
- while (nwaiters >= (1 << COND_CLOCK_BITS));
+ while (nwaiters >= (1 << COND_NWAITERS_SHIFT));
}
return 0;
Modified: trunk/libc/nptl/pthread_cond_init.c
==============================================================================
--- trunk/libc/nptl/pthread_cond_init.c (original)
+++ trunk/libc/nptl/pthread_cond_init.c Mon Jun 4 13:34:58 2007
@@ -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 <drepper@xxxxxxxxxx>, 2002.
@@ -31,8 +31,8 @@
cond->__data.__lock = LLL_MUTEX_LOCK_INITIALIZER;
cond->__data.__futex = 0;
cond->__data.__nwaiters = (icond_attr != NULL
- && ((icond_attr->value & (COND_CLOCK_BITS << 1))
- >> 1));
+ && ((icond_attr->value
+ & (COND_NWAITERS_SHIFT << 1)) >> 1));
cond->__data.__total_seq = 0;
cond->__data.__wakeup_seq = 0;
cond->__data.__woken_seq = 0;
Modified: trunk/libc/nptl/pthread_cond_timedwait.c
==============================================================================
--- trunk/libc/nptl/pthread_cond_timedwait.c (original)
+++ trunk/libc/nptl/pthread_cond_timedwait.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
@@ -67,7 +67,7 @@
/* We have one new user of the condvar. */
++cond->__data.__total_seq;
++cond->__data.__futex;
- cond->__data.__nwaiters += 1 << COND_CLOCK_BITS;
+ cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT;
/* Remember the mutex we are using here. If there is already a
different address store this is a bad user bug. Do not store
@@ -100,7 +100,7 @@
int ret;
ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
(cond->__data.__nwaiters
- & ((1 << COND_CLOCK_BITS) - 1)),
+ & ((1 << COND_NWAITERS_SHIFT) - 1)),
&rt);
# ifndef __ASSUME_POSIX_TIMERS
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
@@ -189,13 +189,13 @@
bc_out:
- cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
+ cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
/* If pthread_cond_destroy was called on this variable already,
notify the pthread_cond_destroy caller all waiters have left
and it can be successfully destroyed. */
if (cond->__data.__total_seq == -1ULL
- && cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
+ && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
lll_futex_wake (&cond->__data.__nwaiters, 1);
/* We are done with the condvar. */
Modified: trunk/libc/nptl/pthread_cond_wait.c
==============================================================================
--- trunk/libc/nptl/pthread_cond_wait.c (original)
+++ trunk/libc/nptl/pthread_cond_wait.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
@@ -62,14 +62,14 @@
++cbuffer->cond->__data.__woken_seq;
}
- cbuffer->cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
+ cbuffer->cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
/* If pthread_cond_destroy was called on this variable already,
notify the pthread_cond_destroy caller all waiters have left
and it can be successfully destroyed. */
destroying = 0;
if (cbuffer->cond->__data.__total_seq == -1ULL
- && cbuffer->cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
+ && cbuffer->cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
{
lll_futex_wake (&cbuffer->cond->__data.__nwaiters, 1);
destroying = 1;
@@ -111,7 +111,7 @@
/* We have one new user of the condvar. */
++cond->__data.__total_seq;
++cond->__data.__futex;
- cond->__data.__nwaiters += 1 << COND_CLOCK_BITS;
+ cond->__data.__nwaiters += 1 << COND_NWAITERS_SHIFT;
/* Remember the mutex we are using here. If there is already a
different address store this is a bad user bug. Do not store
@@ -168,13 +168,13 @@
bc_out:
- cond->__data.__nwaiters -= 1 << COND_CLOCK_BITS;
+ cond->__data.__nwaiters -= 1 << COND_NWAITERS_SHIFT;
/* If pthread_cond_destroy was called on this varaible already,
notify the pthread_cond_destroy caller all waiters have left
and it can be successfully destroyed. */
if (cond->__data.__total_seq == -1ULL
- && cond->__data.__nwaiters < (1 << COND_CLOCK_BITS))
+ && cond->__data.__nwaiters < (1 << COND_NWAITERS_SHIFT))
lll_futex_wake (&cond->__data.__nwaiters, 1);
/* We are done with the condvar. */
Modified: trunk/libc/nptl/pthread_condattr_getclock.c
==============================================================================
--- trunk/libc/nptl/pthread_condattr_getclock.c (original)
+++ trunk/libc/nptl/pthread_condattr_getclock.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2003.
@@ -26,6 +26,6 @@
clockid_t *clock_id;
{
*clock_id = (((((const struct pthread_condattr *) attr)->value) >> 1)
- & ((1 << COND_CLOCK_BITS) - 1));
+ & ((1 << COND_NWAITERS_SHIFT) - 1));
return 0;
}
Modified: trunk/libc/nptl/pthread_condattr_setclock.c
==============================================================================
--- trunk/libc/nptl/pthread_condattr_setclock.c (original)
+++ trunk/libc/nptl/pthread_condattr_setclock.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2003.
@@ -62,11 +62,12 @@
return EINVAL;
/* Make sure the value fits in the bits we reserved. */
- assert (clock_id < (1 << COND_CLOCK_BITS));
+ assert (clock_id < (1 << COND_NWAITERS_SHIFT));
int *valuep = &((struct pthread_condattr *) attr)->value;
- *valuep = (*valuep & ~(1 << (COND_CLOCK_BITS + 1)) & ~1) | (clock_id << 1);
+ *valuep = ((*valuep & ~(1 << (COND_NWAITERS_SHIFT + 1)) & ~1)
+ | (clock_id << 1));
return 0;
}
Modified: trunk/libc/nptl/pthread_getattr_np.c
==============================================================================
--- trunk/libc/nptl/pthread_getattr_np.c (original)
+++ trunk/libc/nptl/pthread_getattr_np.c Mon Jun 4 13:34:58 2007
@@ -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 <drepper@xxxxxxxxxx>, 2002.
@@ -38,10 +38,6 @@
struct pthread *thread = (struct pthread *) thread_id;
struct pthread_attr *iattr = (struct pthread_attr *) attr;
int ret = 0;
-
- /* We have to handle cancellation in the following code since we are
- locking another threads desriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &thread->lock);
lll_lock (thread->lock);
@@ -175,7 +171,5 @@
lll_unlock (thread->lock);
- pthread_cleanup_pop (0);
-
return ret;
}
Modified: trunk/libc/nptl/pthread_getschedparam.c
==============================================================================
--- trunk/libc/nptl/pthread_getschedparam.c (original)
+++ trunk/libc/nptl/pthread_getschedparam.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -38,10 +38,6 @@
int result = 0;
- /* We have to handle cancellation in the following code since we are
- locking another threads descriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
lll_lock (pd->lock);
/* The library is responsible for maintaining the values at all
@@ -74,8 +70,6 @@
lll_unlock (pd->lock);
- pthread_cleanup_pop (0);
-
return result;
}
strong_alias (__pthread_getschedparam, pthread_getschedparam)
Modified: trunk/libc/nptl/pthread_rwlock_init.c
==============================================================================
--- trunk/libc/nptl/pthread_rwlock_init.c (original)
+++ trunk/libc/nptl/pthread_rwlock_init.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include "pthreadP.h"
+#include <kernel-features.h>
static const struct pthread_rwlockattr default_attr =
@@ -37,14 +38,44 @@
iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_attr;
rwlock->__data.__lock = 0;
- rwlock->__data.__flags
- = iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
rwlock->__data.__nr_readers = 0;
- rwlock->__data.__writer = 0;
rwlock->__data.__readers_wakeup = 0;
rwlock->__data.__writer_wakeup = 0;
rwlock->__data.__nr_readers_queued = 0;
rwlock->__data.__nr_writers_queued = 0;
+ rwlock->__data.__writer = 0;
+
+ rwlock->__data.__flags
+ = iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
+
+ /* The __SHARED field is computed to minimize the work that needs to
+ be done while handling the futex. There are two inputs: the
+ availability of private futexes and whether the rwlock is shared
+ or private. Unfortunately the value of a private rwlock is
+ fixed: it must be zero. The PRIVATE_FUTEX flag has the value
+ 0x80 in case private futexes are available and zero otherwise.
+ This leads to the following table:
+
+ | pshared | result
+ | shared private | shared private |
+ ------------+-----------------+-----------------+
+ !avail 0 | 0 0 | 0 0 |
+ avail 0x80 | 0x80 0 | 0 0x80 |
+
+ If the pshared value is in locking functions XORed with avail
+ we get the expected result. */
+#ifdef __ASSUME_PRIVATE_FUTEX
+ rwlock->__data.__shared = (iattr->pshared == PTHREAD_PROCESS_PRIVATE
+ ? 0 : FUTEX_PRIVATE_FLAG);
+#else
+ rwlock->__data.__shared = (iattr->pshared == PTHREAD_PROCESS_PRIVATE
+ ? 0
+ : THREAD_GETMEM (THREAD_SELF,
+ header.private_futex));
+#endif
+
+ rwlock->__data.__pad1 = 0;
+ rwlock->__data.__pad2 = 0;
return 0;
}
Modified: trunk/libc/nptl/pthread_rwlock_rdlock.c
==============================================================================
--- trunk/libc/nptl/pthread_rwlock_rdlock.c (original)
+++ trunk/libc/nptl/pthread_rwlock_rdlock.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
@@ -40,7 +40,7 @@
if (rwlock->__data.__writer == 0
/* ...and if either no writer is waiting or we prefer readers. */
&& (!rwlock->__data.__nr_writers_queued
- || rwlock->__data.__flags == 0))
+ || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
{
/* Increment the reader counter. Avoid overflow. */
if (__builtin_expect (++rwlock->__data.__nr_readers == 0, 0))
Modified: trunk/libc/nptl/pthread_rwlock_timedrdlock.c
==============================================================================
--- trunk/libc/nptl/pthread_rwlock_timedrdlock.c (original)
+++ trunk/libc/nptl/pthread_rwlock_timedrdlock.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, 2003.
@@ -43,7 +43,7 @@
if (rwlock->__data.__writer == 0
/* ...and if either no writer is waiting or we prefer readers. */
&& (!rwlock->__data.__nr_writers_queued
- || rwlock->__data.__flags == 0))
+ || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
{
/* Increment the reader counter. Avoid overflow. */
if (++rwlock->__data.__nr_readers == 0)
Modified: trunk/libc/nptl/pthread_rwlock_tryrdlock.c
==============================================================================
--- trunk/libc/nptl/pthread_rwlock_tryrdlock.c (original)
+++ trunk/libc/nptl/pthread_rwlock_tryrdlock.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -32,7 +32,7 @@
if (rwlock->__data.__writer == 0
&& (rwlock->__data.__nr_writers_queued == 0
- || rwlock->__data.__flags == 0))
+ || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
{
if (__builtin_expect (++rwlock->__data.__nr_readers == 0, 0))
{
Modified: trunk/libc/nptl/pthread_setschedparam.c
==============================================================================
--- trunk/libc/nptl/pthread_setschedparam.c (original)
+++ trunk/libc/nptl/pthread_setschedparam.c Mon Jun 4 13:34:58 2007
@@ -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 <drepper@xxxxxxxxxx>, 2002.
@@ -39,10 +39,6 @@
int result = 0;
- /* We have to handle cancellation in the following code since we are
- locking another threads desriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
lll_lock (pd->lock);
struct sched_param p;
@@ -73,8 +69,6 @@
lll_unlock (pd->lock);
- pthread_cleanup_pop (0);
-
return result;
}
strong_alias (__pthread_setschedparam, pthread_setschedparam)
Modified: trunk/libc/nptl/pthread_setschedprio.c
==============================================================================
--- trunk/libc/nptl/pthread_setschedprio.c (original)
+++ trunk/libc/nptl/pthread_setschedprio.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -41,10 +41,6 @@
struct sched_param param;
param.sched_priority = prio;
- /* We have to handle cancellation in the following code since we are
- locking another threads desriptor. */
- pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
lll_lock (pd->lock);
/* If the thread should have higher priority because of some
@@ -66,7 +62,5 @@
lll_unlock (pd->lock);
- pthread_cleanup_pop (0);
-
return result;
}
Modified: trunk/libc/nptl/sem_getvalue.c
==============================================================================
--- trunk/libc/nptl/sem_getvalue.c (original)
+++ trunk/libc/nptl/sem_getvalue.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -27,11 +27,11 @@
sem_t *sem;
int *sval;
{
- struct sem *isem = (struct sem *) sem;
+ struct new_sem *isem = (struct new_sem *) sem;
/* XXX Check for valid SEM parameter. */
- *sval = isem->count;
+ *sval = isem->value;
return 0;
}
Modified: trunk/libc/nptl/sem_init.c
==============================================================================
--- trunk/libc/nptl/sem_init.c (original)
+++ trunk/libc/nptl/sem_init.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <shlib-compat.h>
#include "semaphoreP.h"
+#include <kernel-features.h>
int
@@ -38,18 +39,50 @@
}
/* Map to the internal type. */
- struct sem *isem = (struct sem *) sem;
+ struct new_sem *isem = (struct new_sem *) sem;
- /* Use the value the user provided. */
- isem->count = value;
+ /* Use the values the user provided. */
+ isem->value = value;
+#ifdef __ASSUME_PRIVATE_FUTEX
+ isem->private = pshared ? 0 : FUTEX_PRIVATE_FLAG;
+#else
+ isem->private = pshared ? 0 : THREAD_GETMEM (THREAD_SELF,
+ header.private_futex);
+#endif
- /* We can completely ignore the PSHARED parameter since inter-process
- use needs no special preparation. */
+ isem->nwaiters = 0;
return 0;
}
versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1);
+
+
+
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-strong_alias (__new_sem_init, __old_sem_init)
+int
+attribute_compat_text_section
+__old_sem_init (sem, pshared, value)
+ sem_t *sem;
+ int pshared;
+ unsigned int value;
+{
+ /* Parameter sanity check. */
+ if (__builtin_expect (value > SEM_VALUE_MAX, 0))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* Map to the internal type. */
+ struct old_sem *isem = (struct old_sem *) sem;
+
+ /* Use the value the user provided. */
+ isem->value = value;
+
+ /* We cannot store the PSHARED attribute. So we always use the
+ operations needed for shared semaphores. */
+
+ return 0;
+}
compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0);
#endif
Modified: trunk/libc/nptl/sem_open.c
==============================================================================
--- trunk/libc/nptl/sem_open.c (original)
+++ trunk/libc/nptl/sem_open.c Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -304,12 +304,14 @@
/* Create the initial file content. */
sem_t initsem;
- struct sem *iinitsem = (struct sem *) &initsem;
- iinitsem->count = value;
+ struct new_sem *iinitsem = (struct new_sem *) &initsem;
+ iinitsem->value = value;
+ iinitsem->private = 0;
+ iinitsem->nwaiters = 0;
/* Initialize the remaining bytes as well. */
- memset ((char *) &initsem + sizeof (struct sem), '\0',
- sizeof (sem_t) - sizeof (struct sem));
+ memset ((char *) &initsem + sizeof (struct new_sem), '\0',
+ sizeof (sem_t) - sizeof (struct new_sem));
tmpfname = (char *) alloca (mountpoint.dirlen + 6 + 1);
char *xxxxxx = __mempcpy (tmpfname, mountpoint.dir, mountpoint.dirlen);
Modified: trunk/libc/nptl/semaphoreP.h
==============================================================================
--- trunk/libc/nptl/semaphoreP.h (original)
+++ trunk/libc/nptl/semaphoreP.h Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -60,8 +60,10 @@
/* Prototypes of functions with multiple interfaces. */
extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value);
+extern int __old_sem_init (sem_t *sem, int pshared, unsigned int value);
extern int __new_sem_destroy (sem_t *sem);
extern int __new_sem_post (sem_t *sem);
extern int __new_sem_wait (sem_t *sem);
+extern int __old_sem_wait (sem_t *sem);
extern int __new_sem_trywait (sem_t *sem);
extern int __new_sem_getvalue (sem_t *sem, int *sval);
Modified: trunk/libc/nptl/sysdeps/alpha/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/alpha/tls.h (original)
+++ trunk/libc/nptl/sysdeps/alpha/tls.h Mon Jun 4 13:34:58 2007
@@ -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 */
Modified: trunk/libc/nptl/sysdeps/i386/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/i386/tls.h (original)
+++ trunk/libc/nptl/sysdeps/i386/tls.h Mon Jun 4 13:34:58 2007
@@ -444,7 +444,7 @@
#define THREAD_GSCOPE_RESET_FLAG() \
do \
{ int __res; \
- asm volatile ("xchg %0, %%gs:%P1" \
+ asm volatile ("xchgl %0, %%gs:%P1" \
: "=r" (__res) \
: "i" (offsetof (struct pthread, header.gscope_flag)), \
"0" (THREAD_GSCOPE_FLAG_UNUSED)); \
@@ -454,17 +454,8 @@
while (0)
#define THREAD_GSCOPE_SET_FLAG() \
THREAD_SETMEM (THREAD_SELF, header.gscope_flag, THREAD_GSCOPE_FLAG_USED)
-#ifdef PTR_DEMANGLE
-# define THREAD_GSCOPE_WAIT() \
- do { void (*ptr) (void) = GL(dl_wait_lookup_done); \
- PTR_DEMANGLE (ptr); \
- ptr (); \
- } while (0)
-#else
-# define THREAD_GSCOPE_WAIT() \
+#define THREAD_GSCOPE_WAIT() \
GL(dl_wait_lookup_done) ()
-#endif
-
#endif /* __ASSEMBLER__ */
Modified: trunk/libc/nptl/sysdeps/ia64/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/ia64/tls.h (original)
+++ trunk/libc/nptl/sysdeps/ia64/tls.h Mon Jun 4 13:34:58 2007
@@ -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 */
Modified: trunk/libc/nptl/sysdeps/powerpc/tcb-offsets.sym
==============================================================================
--- trunk/libc/nptl/sysdeps/powerpc/tcb-offsets.sym (original)
+++ trunk/libc/nptl/sysdeps/powerpc/tcb-offsets.sym Mon Jun 4 13:34:58 2007
@@ -15,3 +15,4 @@
PID thread_offsetof (pid)
TID thread_offsetof (tid)
POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
+PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
Modified: trunk/libc/nptl/sysdeps/powerpc/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/powerpc/tls.h (original)
+++ trunk/libc/nptl/sysdeps/powerpc/tls.h Mon Jun 4 13:34:58 2007
@@ -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 */
Modified: trunk/libc/nptl/sysdeps/pthread/pthread.h
==============================================================================
--- trunk/libc/nptl/sysdeps/pthread/pthread.h (original)
+++ trunk/libc/nptl/sysdeps/pthread/pthread.h Mon Jun 4 13:34:58 2007
@@ -21,6 +21,7 @@
#define _PTHREAD_H 1
#include <features.h>
+#include <endian.h>
#include <sched.h>
#include <time.h>
@@ -120,21 +121,23 @@
};
/* Read-write lock initializers. */
-# if __WORDSIZE == 64
-# define PTHREAD_RWLOCK_INITIALIZER \
+# define PTHREAD_RWLOCK_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
-# else
-# define PTHREAD_RWLOCK_INITIALIZER \
- { { 0, 0, 0, 0, 0, 0, 0, 0 } }
-# endif
# ifdef __USE_GNU
# if __WORDSIZE == 64
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
# else
-# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
- { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 0 } }
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
+ 0, 0, 0, 0 } }
+# else
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
+ 0 } }
+# endif
# endif
# endif
#endif /* Unix98 or XOpen2K */
Modified: trunk/libc/nptl/sysdeps/s390/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/s390/tls.h (original)
+++ trunk/libc/nptl/sysdeps/s390/tls.h Mon Jun 4 13:34:58 2007
@@ -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
@@ -27,6 +27,7 @@
# include <stdint.h>
# include <stdlib.h>
# include <list.h>
+# include <kernel-features.h>
/* Type for the dtv. */
@@ -50,6 +51,10 @@
int multiple_threads;
uintptr_t sysinfo;
uintptr_t stack_guard;
+ int gscope_flag;
+#ifndef __ASSUME_PRIVATE_FUTEX
+ int private_futex;
+#endif
} tcbhead_t;
# ifndef __s390x__
@@ -168,6 +173,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 */
Modified: trunk/libc/nptl/sysdeps/sh/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/sh/tls.h (original)
+++ trunk/libc/nptl/sysdeps/sh/tls.h Mon Jun 4 13:34:58 2007
@@ -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 */
Modified: trunk/libc/nptl/sysdeps/sparc/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/sparc/tls.h (original)
+++ trunk/libc/nptl/sysdeps/sparc/tls.h Mon Jun 4 13:34:58 2007
@@ -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 */
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/Makefile (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/Makefile Mon Jun 4 13:34:58 2007
@@ -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 <drepper@xxxxxxxxxx>, 2002.
@@ -25,7 +25,8 @@
gen-as-const-headers += lowlevelcond.sym lowlevelrwlock.sym \
lowlevelbarrier.sym unwindbuf.sym \
- lowlevelrobustlock.sym pthread-pi-defines.sym
+ lowlevelrobustlock.sym pthread-pi-defines.sym \
+ structsem.sym
endif
ifeq ($(subdir),posix)
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 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
@@ -237,8 +237,6 @@
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
-
/* The states of a lock are:
0 - untaken
1 - taken by one user
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h Mon Jun 4 13:34:58 2007
@@ -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
@@ -128,7 +128,10 @@
unsigned int __nr_writers_queued;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
int __writer;
} __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S Mon Jun 4 13:34:58 2007
@@ -19,16 +19,6 @@
#include <kernel-features.h>
-/* In libc.so we do not unconditionally use the lock prefix. Only if
- the application is using threads. */
-#ifndef UP
-# define LOCK \
- cmpl $0, %gs:MULTIPLE_THREADS_OFFSET; \
- je 0f; \
- lock; \
-0:
-#endif
-
/* All locks in libc are private. Use the kernel feature if possible. */
#define FUTEX_PRIVATE_FLAG 128
#ifdef __ASSUME_PRIVATE_FUTEX
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S Mon Jun 4 13:34:58 2007
@@ -219,35 +219,6 @@
#endif
-#ifdef NOT_IN_libc
- .globl lll_unlock_wake_cb
- .type lll_unlock_wake_cb,@function
- .hidden lll_unlock_wake_cb
- .align 16
-lll_unlock_wake_cb:
- pushl %ebx
- pushl %ecx
- pushl %edx
-
- movl 20(%esp), %ebx
- LOCK
- subl $1, (%ebx)
- je 1f
-
- movl $FUTEX_WAKE, %ecx
- movl $1, %edx /* Wake one thread. */
- movl $SYS_futex, %eax
- movl $0, (%ebx)
- ENTER_KERNEL
-
-1: popl %edx
- popl %ecx
- popl %ebx
- ret
- .size lll_unlock_wake_cb,.-lll_unlock_wake_cb
-#endif
-
-
.globl __lll_mutex_unlock_wake
.type __lll_mutex_unlock_wake,@function
.hidden __lll_mutex_unlock_wake
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -69,7 +69,13 @@
/* Wait for the remaining threads. The call will return immediately
if the CURR_EVENT memory has meanwhile been changed. */
-7: xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
+7:
+#if FUTEX_WAIT == 0
+ movl PRIVATE(%ebx), %ecx
+#else
+ movl $FUTEX_WAIT, %ecx
+ orl PRIVATE(%ebx), %ecx
+#endif
xorl %esi, %esi
8: movl $SYS_futex, %eax
ENTER_KERNEL
@@ -120,6 +126,7 @@
so 0x7fffffff is the highest value. */
movl $0x7fffffff, %edx
movl $FUTEX_WAKE, %ecx
+ orl PRIVATE(%ebx), %ecx
movl $SYS_futex, %eax
ENTER_KERNEL
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Mon Jun 4 13:34:58 2007
@@ -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 <drepper@xxxxxxxxxx>, 2002.
@@ -87,7 +87,7 @@
addl $1, total_seq(%ebx)
adcl $0, total_seq+4(%ebx)
addl $1, cond_futex(%ebx)
- addl $(1 << clock_bits), cond_nwaiters(%ebx)
+ addl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
#define FRAME_SIZE 24
subl $FRAME_SIZE, %esp
@@ -106,7 +106,7 @@
#ifdef __NR_clock_gettime
/* Get the clock number. */
movl cond_nwaiters(%ebx), %ebx
- andl $((1 << clock_bits) - 1), %ebx
+ andl $((1 << nwaiters_shift) - 1), %ebx
/* Only clocks 0 and 1 are allowed so far. Both are handled in the
kernel. */
leal 4(%esp), %ecx
@@ -228,7 +228,7 @@
14: addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
-24: subl $(1 << clock_bits), cond_nwaiters(%ebx)
+24: subl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
/* Wake up a thread which wants to destroy the condvar object. */
movl total_seq(%ebx), %eax
@@ -236,7 +236,7 @@
cmpl $0xffffffff, %eax
jne 25f
movl cond_nwaiters(%ebx), %eax
- andl $~((1 << clock_bits) - 1), %eax
+ andl $~((1 << nwaiters_shift) - 1), %eax
jne 25f
addl $cond_nwaiters, %ebx
@@ -424,7 +424,7 @@
7: addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
-3: subl $(1 << clock_bits), cond_nwaiters(%ebx)
+3: subl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
/* Wake up a thread which wants to destroy the condvar object. */
xorl %edi, %edi
@@ -433,7 +433,7 @@
cmpl $0xffffffff, %eax
jne 4f
movl cond_nwaiters(%ebx), %eax
- andl $~((1 << clock_bits) - 1), %eax
+ andl $~((1 << nwaiters_shift) - 1), %eax
jne 4f
addl $cond_nwaiters, %ebx
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Mon Jun 4 13:34:58 2007
@@ -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 <drepper@xxxxxxxxxx>, 2002.
@@ -80,7 +80,7 @@
addl $1, total_seq(%ebx)
adcl $0, total_seq+4(%ebx)
addl $1, cond_futex(%ebx)
- addl $(1 << clock_bits), cond_nwaiters(%ebx)
+ addl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
#define FRAME_SIZE 16
subl $FRAME_SIZE, %esp
@@ -157,7 +157,7 @@
adcl $0, woken_seq+4(%ebx)
/* Unlock */
-16: subl $(1 << clock_bits), cond_nwaiters(%ebx)
+16: subl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
/* Wake up a thread which wants to destroy the condvar object. */
movl total_seq(%ebx), %eax
@@ -165,7 +165,7 @@
cmpl $0xffffffff, %eax
jne 17f
movl cond_nwaiters(%ebx), %eax
- andl $~((1 << clock_bits) - 1), %eax
+ andl $~((1 << nwaiters_shift) - 1), %eax
jne 17f
addl $cond_nwaiters, %ebx
@@ -315,7 +315,7 @@
7: addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
-3: subl $(1 << clock_bits), cond_nwaiters(%ebx)
+3: subl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
/* Wake up a thread which wants to destroy the condvar object. */
xorl %edi, %edi
@@ -324,7 +324,7 @@
cmpl $0xffffffff, %eax
jne 4f
movl cond_nwaiters(%ebx), %eax
- andl $~((1 << clock_bits) - 1), %eax
+ andl $~((1 << nwaiters_shift) - 1), %eax
jne 4f
addl $cond_nwaiters, %ebx
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -61,7 +61,7 @@
jne 14f
cmpl $0, WRITERS_QUEUED(%ebx)
je 5f
- cmpl $0, FLAGS(%ebx)
+ cmpb $0, FLAGS(%ebx)
je 5f
3: addl $1, READERS_QUEUED(%ebx)
@@ -77,8 +77,18 @@
#endif
jne 10f
-11: addl $READERS_WAKEUP, %ebx
- movl %esi, %ecx /* movl $FUTEX_WAIT, %ecx */
+11:
+#if __ASSUME_PRIVATE_FUTEX
+ movzbl PSHARED(%ebx), %ecx
+ xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
+#else
+ movzbl PSHARED(%ebx), %ecx
+# if FUTEX_WAIT != 0
+ orl $FUTEX_WAIT, %ecx
+# endif
+ xorl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $READERS_WAKEUP, %ebx
movl $SYS_futex, %eax
ENTER_KERNEL
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -65,7 +65,7 @@
jne 14f
cmpl $0, WRITERS_QUEUED(%ebp)
je 5f
- cmpl $0, FLAGS(%ebp)
+ cmpb $0, FLAGS(%ebp)
je 5f
/* Check the value of the timeout parameter. */
@@ -108,8 +108,18 @@
/* Futex call. */
movl %ecx, (%esp) /* Store relative timeout. */
movl %edx, 4(%esp)
+
movl %esi, %edx
- xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
+#if __ASSUME_PRIVATE_FUTEX
+ movzbl PSHARED(%ebp), %ecx
+ xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
+#else
+ movzbl PSHARED(%ebp), %ecx
+# if FUTEX_WAIT != 0
+ orl $FUTEX_WAIT, %ecx
+# endif
+ xorl %gs:PRIVATE_FUTEX, %ecx
+#endif
movl %esp, %esi
leal READERS_WAKEUP(%ebp), %ebx
movl $SYS_futex, %eax
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -106,8 +106,18 @@
/* Futex call. */
movl %ecx, (%esp) /* Store relative timeout. */
movl %edx, 4(%esp)
+
movl %esi, %edx
- xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
+#if __ASSUME_PRIVATE_FUTEX
+ movzbl PSHARED(%ebp), %ecx
+ xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
+#else
+ movzbl PSHARED(%ebp), %ecx
+# if FUTEX_WAIT != 0
+ orl $FUTEX_WAIT, %ecx
+# endif
+ xorl %gs:PRIVATE_FUTEX, %ecx
+#endif
movl %esp, %esi
leal WRITERS_WAKEUP(%ebp), %ebx
movl $SYS_futex, %eax
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -61,9 +61,8 @@
5: movl $0, WRITER(%edi)
- movl $1, %ecx
+ movl $1, %edx
leal WRITERS_WAKEUP(%edi), %ebx
- movl %ecx, %edx
cmpl $0, WRITERS_QUEUED(%edi)
jne 0f
@@ -83,7 +82,16 @@
#endif
jne 7f
-8: movl $SYS_futex, %eax
+8:
+#if __ASSUME_PRIVATE_FUTEX
+ movzbl PSHARED(%edi), %ecx
+ xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %ecx
+#else
+ movzbl PSHARED(%edi), %ecx
+ orl $FUTEX_WAKE, %ecx
+ xorl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ movl $SYS_futex, %eax
ENTER_KERNEL
xorl %eax, %eax
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -75,8 +75,18 @@
#endif
jne 10f
-11: addl $WRITERS_WAKEUP, %ebx
- movl %esi, %ecx /* movl $FUTEX_WAIT, %ecx */
+11:
+#if __ASSUME_PRIVATE_FUTEX
+ movzbl PSHARED(%ebx), %ecx
+ xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
+#else
+ movzbl PSHARED(%ebx), %ecx
+# if FUTEX_WAIT != 0
+ orl $FUTEX_WAIT, %ecx
+# endif
+ xorl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $WRITERS_WAKEUP, %ebx
movl $SYS_futex, %eax
ENTER_KERNEL
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S Mon Jun 4 13:34:58 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -20,6 +20,7 @@
#include <sysdep.h>
#include <shlib-compat.h>
#include <pthread-errnos.h>
+#include <structsem.h>
#ifndef UP
# define LOCK lock
@@ -40,19 +41,27 @@
pushl %ebx
movl 8(%esp), %ebx
+
+ LOCK
+#if VALUE == 0
+ addl $1, (%ebx)
+#else
+ addl $1, VALUE(%ebx)
+#endif
+
+ cmpl $0, NWAITERS(%ebx)
+ je 2f
+
+ movl $FUTEX_WAKE, %ecx
+ orl PRIVATE(%ebx), %ecx
movl $1, %edx
- LOCK
- xaddl %edx, (%ebx)
-
movl $SYS_futex, %eax
- movl $FUTEX_WAKE, %ecx
- addl $1, %edx
ENTER_KERNEL
testl %eax, %eax
js 1f
- xorl %eax, %eax
+2: xorl %eax, %eax
popl %ebx
ret
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (original)
[... 2728 lines stripped ...]