[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r3139 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/alpha/ nptl/sysdeps/unix/sysv/linux/i386/ nptl/sysdeps/uni...
- To: commits@xxxxxxxxxx
- Subject: [commits] r3139 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/alpha/ nptl/sysdeps/unix/sysv/linux/i386/ nptl/sysdeps/uni...
- From: eglibc@xxxxxxxxxx
- Date: Tue, 14 Aug 2007 07:03:14 -0000
Author: eglibc
Date: Tue Aug 14 00:03:13 2007
New Revision: 3139
Log:
Import glibc-mainline for 2007-08-14
Added:
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i786/
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i786/Implies
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/allocatestack.c
fsf/trunk/libc/nptl/init.c
fsf/trunk/libc/nptl/pthread_cond_timedwait.c
fsf/trunk/libc/nptl/pthread_create.c
fsf/trunk/libc/nptl/pthread_mutex_init.c
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
fsf/trunk/libc/nscd/gai.c
fsf/trunk/libc/nscd/servicescache.c
fsf/trunk/libc/sysdeps/unix/clock_settime.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/fstatfs64.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/fxstatat.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/if_index.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/ifaddrs.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/ppoll.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/pselect.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/statfs64.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/libc-start.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/xstatconv.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Aug 14 00:03:13 2007
@@ -1,3 +1,48 @@
+2007-08-13 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PSELECT,
+ __ASSUME_PPOLL, __ASSUME_ATFCTS, __ASSUME_SET_ROBUST_LIST,
+ __ASSUME_UTIMENSAT, __ASSUME_FALLOCATE): Update per-arch conditions
+ when each feature was introduced.
+
+ * sysdeps/unix/sysv/linux/dl-vdso.c: Don't include dl-hash.h.
+ * sysdeps/unix/sysv/linux/dl-vdso.h: Don't include dl-hash.h if NDEBUG.
+ (CHECK_HASH): New macro.
+ (PREPARE_VERSION): Use it.
+
+ * sysdeps/unix/sysv/linux/pselect.c (__generic_pselect): Only provide
+ prototype if not __ASSUME_PSELECT.
+ * sysdeps/unix/sysv/linux/ppoll.c (__generic_ppoll): Only provide
+ prototype if not __ASSUME_PPOLL.
+
+ * sysdeps/unix/sysv/linux/dl-osinfo.h (ROUND): #undef after use.
+
+ * sysdeps/unix/clock_settime.c (freq, __pthread_clock_settime,
+ hp_timing_settime): Don't define or declare if HANDLED_CPUTIME
+ is defined.
+
+2007-08-13 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/libc-start.c
+ (_libc_vdso_platform_setup): If vDSO is not available point
+ __vdso_gettimeofday to the vsyscall.
+ * sysdeps/unix/sysv/linux/x86_64/gettimeofday.S [SHARED]: Use
+ __vdso_gettimeofday instead of vsyscall.
+
+2007-08-13 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * nscd/servicescache.c: Include kernel-features.h.
+ * nscd/gai.c: Likewise.
+ * sysdeps/unix/sysv/linux/statfs64.c: Likewise.
+ * sysdeps/unix/sysv/linux/fstatfs64.c: Likewise.
+ * sysdeps/unix/sysv/linux/fxstatat.c: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise.
+ * sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
+ * sysdeps/unix/sysv/linux/if_index.c: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Likewise.
+ * sysdeps/unix/sysv/linux/ifaddrs.c: Likewise.
+
2007-08-12 Ulrich Drepper <drepper@xxxxxxxxxx>
* elf/dl-dst.h: No need for _dl_dst_count, _dl_dst_substitute,
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Tue Aug 14 00:03:13 2007
@@ -1,3 +1,66 @@
+2007-08-13 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
+ Fix a pasto.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
+ (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
+ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
+ Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
+ (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
+ FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
+ kernel-features.h.
+ (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
+ lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
+ process private. Switch DW_CFA_advance_loc1 and some
+ DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
+ lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
+ process private. Switch DW_CFA_advance_loc{1,2} and some
+ DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
+ #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
+ * 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.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
+ (__pthread_cond_broadcast): Compare %r8 instead of
+ dep_mutex-cond_*(%rdi) with $-1.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
+ (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
+ of oring.
+
+2007-08-13 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
+
+2007-08-13 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * allocatestack.c: Include kernel-features.h.
+ * pthread_create.c: Likewise.
+ * pthread_mutex_init.c: Likewise.
+ * init.c: Likewise.
+ * pthread_cond_timedwait.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
+
2007-08-12 Jakub Jelinek <jakub@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
Modified: fsf/trunk/libc/nptl/allocatestack.c
==============================================================================
--- fsf/trunk/libc/nptl/allocatestack.c (original)
+++ fsf/trunk/libc/nptl/allocatestack.c Tue Aug 14 00:03:13 2007
@@ -28,6 +28,7 @@
#include <dl-sysdep.h>
#include <tls.h>
#include <lowlevellock.h>
+#include <kernel-features.h>
#ifndef NEED_SEPARATE_REGISTER_STACK
Modified: fsf/trunk/libc/nptl/init.c
==============================================================================
--- fsf/trunk/libc/nptl/init.c (original)
+++ fsf/trunk/libc/nptl/init.c Tue Aug 14 00:03:13 2007
@@ -33,6 +33,7 @@
#include <shlib-compat.h>
#include <smp.h>
#include <lowlevellock.h>
+#include <kernel-features.h>
/* Size and alignment of static TLS block. */
Modified: fsf/trunk/libc/nptl/pthread_cond_timedwait.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_cond_timedwait.c (original)
+++ fsf/trunk/libc/nptl/pthread_cond_timedwait.c Tue Aug 14 00:03:13 2007
@@ -23,6 +23,7 @@
#include <lowlevellock.h>
#include <pthread.h>
#include <pthreadP.h>
+#include <kernel-features.h>
#include <shlib-compat.h>
Modified: fsf/trunk/libc/nptl/pthread_create.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_create.c (original)
+++ fsf/trunk/libc/nptl/pthread_create.c Tue Aug 14 00:03:13 2007
@@ -27,6 +27,7 @@
#include <atomic.h>
#include <libc-internal.h>
#include <resolv.h>
+#include <kernel-features.h>
#include <shlib-compat.h>
Modified: fsf/trunk/libc/nptl/pthread_mutex_init.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_mutex_init.c (original)
+++ fsf/trunk/libc/nptl/pthread_mutex_init.c Tue Aug 14 00:03:13 2007
@@ -21,6 +21,7 @@
#include <assert.h>
#include <errno.h>
#include <string.h>
+#include <kernel-features.h>
#include "pthreadP.h"
static const struct pthread_mutexattr default_attr =
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h Tue Aug 14 00:03:13 2007
@@ -24,6 +24,7 @@
#include <bits/pthreadtypes.h>
#include <atomic.h>
#include <sysdep.h>
+#include <kernel-features.h>
#define __NR_futex 394
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S Tue Aug 14 00:03:13 2007
@@ -83,11 +83,18 @@
je 9f
/* XXX: The kernel so far doesn't support requeue to PI futex. */
- testl $PI_BIT, MUTEX_KIND(%edi)
+ /* XXX: The kernel only supports FUTEX_CMP_REQUEUE to the same
+ type of futex (private resp. shared). */
+ testl $(PI_BIT | PS_BIT), MUTEX_KIND(%edi)
jne 9f
/* Wake up all threads. */
- movl $FUTEX_CMP_REQUEUE, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ movl $(FUTEX_CMP_REQUEUE|FUTEX_PRIVATE_FLAG), %ecx
+#else
+ movl %gs:PRIVATE_FUTEX, %ecx
+ orl $FUTEX_CMP_REQUEUE, %ecx
+#endif
movl $SYS_futex, %eax
movl $0x7fffffff, %esi
movl $1, %edx
@@ -132,28 +139,63 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
jmp 2b
/* Unlock in loop requires waekup. */
5: leal cond_lock-cond_futex(%ebx), %eax
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 6b
/* Unlock in loop requires waekup. */
7: leal cond_lock-cond_futex(%ebx), %eax
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 8b
9: /* The futex requeue functionality is not available. */
movl $0x7fffffff, %edx
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $SYS_futex, %eax
ENTER_KERNEL
jmp 10b
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S Tue Aug 14 00:03:13 2007
@@ -70,7 +70,18 @@
/* Wake up one thread. */
pushl %esi
pushl %ebp
- movl $FUTEX_WAKE_OP, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE_OP, %ecx
movl $SYS_futex, %eax
movl $1, %edx
movl $1, %esi
@@ -92,7 +103,9 @@
popl %ebx
ret
-7: movl $FUTEX_WAKE, %ecx
+7: /* %ecx should be either FUTEX_WAKE_OP or
+ FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall. */
+ xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx
movl $SYS_futex, %eax
/* %edx should be 1 already from $FUTEX_WAKE_OP syscall.
movl $1, %edx */
@@ -106,8 +119,16 @@
/* Unlock in loop requires wakeup. */
5: movl %edi, %eax
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 6b
@@ -118,8 +139,16 @@
#else
leal cond_lock(%edi), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%edi)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
jmp 2b
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Tue Aug 14 00:03:13 2007
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <pthread-errnos.h>
+#include <kernel-features.h>
.text
@@ -157,7 +158,20 @@
movl %eax, (%esp)
leal 4(%esp), %esi
- xorl %ecx, %ecx /* movl $FUTEX_WAIT, %ecx */
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+#if FUTEX_WAIT != 0
+ addl $FUTEX_WAIT, %ecx
+#endif
movl %edi, %edx
addl $cond_futex, %ebx
.Ladd_cond_futex:
@@ -231,7 +245,18 @@
addl $cond_nwaiters, %ebx
movl $SYS_futex, %eax
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_nwaiters(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $1, %edx
ENTER_KERNEL
subl $cond_nwaiters, %ebx
@@ -279,8 +304,16 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
jmp 2b
@@ -292,8 +325,16 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 4b
@@ -304,8 +345,16 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
jmp 6b
@@ -316,8 +365,16 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 11b
@@ -338,8 +395,16 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
movl %esi, %eax
@@ -400,8 +465,16 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
1: movl broadcast_seq(%ebx), %eax
@@ -440,7 +513,18 @@
addl $cond_nwaiters, %ebx
movl $SYS_futex, %eax
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_nwaiters(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $1, %edx
ENTER_KERNEL
subl $cond_nwaiters, %ebx
@@ -459,15 +543,34 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
/* Wake up all waiters to make sure no signal gets lost. */
2: testl %edi, %edi
jnz 5f
addl $cond_futex, %ebx
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $SYS_futex, %eax
movl $0x7fffffff, %edx
ENTER_KERNEL
@@ -587,12 +690,12 @@
.uleb128 20
.byte 0x83 # DW_CFA_offset %ebx
.uleb128 5
- .byte 2 # DW_CFA_advance_loc1
- .byte .Lsubl-.Lpush_ebx
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .Lsubl-.Lpush_ebx
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20+FRAME_SIZE
- .byte 3 # DW_CFA_advance_loc2
- .2byte .Laddl-.Lsubl
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .Laddl-.Lsubl
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20
.byte 0x40+.Lpop_ebx-.Laddl # DW_CFA_advance_loc+N
@@ -614,7 +717,8 @@
.byte 0x40+.LSbl1-.Lpop_edi # DW_CFA_advance_loc+N
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20
- .byte 0x40+.LSbl2-.LSbl1 # DW_CFA_advance_loc+N
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .LSbl2-.LSbl1
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20+FRAME_SIZE
.byte 0x85 # DW_CFA_offset %ebp
@@ -625,14 +729,15 @@
.uleb128 4
.byte 0x83 # DW_CFA_offset %ebx
.uleb128 5
- .byte 0x40+.LSbl3-.LSbl2 # DW_CFA_advance_loc+N
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .LSbl3-.LSbl2
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20
+ .byte 4 # DW_CFA_advance_loc4
#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
- .byte 0x40+.LSbl4-.LSbl3 # DW_CFA_advance_loc+N
-#else
- .byte 4 # DW_CFA_advance_loc4
- .long .LSbl5-.LSbl3
+ .4byte .LSbl4-.LSbl3
+#else
+ .4byte .LSbl5-.LSbl3
#endif
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 20+FRAME_SIZE
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Tue Aug 14 00:03:13 2007
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <tcb-offsets.h>
+#include <kernel-features.h>
.text
@@ -100,7 +101,20 @@
4: call __pthread_enable_asynccancel
movl %eax, (%esp)
- movl %esi, %ecx /* movl $FUTEX_WAIT, %ecx */
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+#if FUTEX_WAIT != 0
+ addl $FUTEX_WAIT, %ecx
+#endif
movl %edi, %edx
addl $cond_futex, %ebx
.Ladd_cond_futex:
@@ -161,7 +175,18 @@
addl $cond_nwaiters, %ebx
movl $SYS_futex, %eax
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_nwaiters(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $1, %edx
ENTER_KERNEL
subl $cond_nwaiters, %ebx
@@ -197,8 +222,16 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
jmp 2b
@@ -210,8 +243,16 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 4b
@@ -222,8 +263,16 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
jmp 6b
@@ -234,8 +283,16 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
jmp 11b
@@ -256,8 +313,16 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
movl %esi, %eax
@@ -292,8 +357,16 @@
#else
leal cond_lock(%ebx), %edx
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_lock_wait
1: movl broadcast_seq(%ebx), %eax
@@ -332,7 +405,18 @@
addl $cond_nwaiters, %ebx
movl $SYS_futex, %eax
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_nwaiters(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $1, %edx
ENTER_KERNEL
subl $cond_nwaiters, %ebx
@@ -351,15 +435,34 @@
#else
leal cond_lock(%ebx), %eax
#endif
- /* XYZ */
- movl $LLL_SHARED, %ecx
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
call __lll_unlock_wake
/* Wake up all waiters to make sure no signal gets lost. */
2: testl %edi, %edi
jnz 5f
addl $cond_futex, %ebx
- movl $FUTEX_WAKE, %ecx
+#if FUTEX_PRIVATE_FLAG > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex-cond_futex(%ebx)
+ sete %cl
+ subl $1, %ecx
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ addl $FUTEX_WAKE, %ecx
movl $SYS_futex, %eax
movl $0x7fffffff, %edx
ENTER_KERNEL
@@ -473,12 +576,12 @@
.uleb128 16
.byte 0x83 # DW_CFA_offset %ebx
.uleb128 4
- .byte 2 # DW_CFA_advance_loc1
- .byte .Lsubl-.Lpush_ebx
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .Lsubl-.Lpush_ebx
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16+FRAME_SIZE
- .byte 2 # DW_CFA_advance_loc1
- .byte .Laddl-.Lsubl
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .Laddl-.Lsubl
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16
.byte 0x40+ .Lpop_ebx-.Laddl # DW_CFA_advance_loc+N
@@ -502,13 +605,16 @@
.uleb128 3
.byte 0x83 # DW_CFA_offset %ebx
.uleb128 4
- .byte 0x40+.LSbl2-.LSbl1 # DW_CFA_advance_loc+N
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .LSbl2-.LSbl1
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16+FRAME_SIZE
- .byte 0x40+.LSbl3-.LSbl2 # DW_CFA_advance_loc+N
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .LSbl3-.LSbl2
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16
- .byte 0x40+.LSbl4-.LSbl3 # DW_CFA_advance_loc+N
+ .byte 4 # DW_CFA_advance_loc4
+ .4byte .LSbl4-.LSbl3
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16+FRAME_SIZE
.align 4
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S Tue Aug 14 00:03:13 2007
@@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <lowlevelrwlock.h>
#include <pthread-errnos.h>
+#include <kernel-features.h>
.text
@@ -68,7 +69,7 @@
jne 10f
11:
-#if __ASSUME_PRIVATE_FUTEX
+#ifdef __ASSUME_PRIVATE_FUTEX
movzbl PSHARED(%ebx), %ecx
xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
#else
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S Tue Aug 14 00:03:13 2007
@@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <lowlevelrwlock.h>
#include <pthread-errnos.h>
+#include <kernel-features.h>
.text
@@ -99,7 +100,7 @@
movl %edx, 4(%esp)
movl %esi, %edx
-#if __ASSUME_PRIVATE_FUTEX
+#ifdef __ASSUME_PRIVATE_FUTEX
movzbl PSHARED(%ebp), %ecx
xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
#else
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S Tue Aug 14 00:03:13 2007
@@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <lowlevelrwlock.h>
#include <pthread-errnos.h>
+#include <kernel-features.h>
.text
@@ -97,7 +98,7 @@
movl %edx, 4(%esp)
movl %esi, %edx
-#if __ASSUME_PRIVATE_FUTEX
+#ifdef __ASSUME_PRIVATE_FUTEX
movzbl PSHARED(%ebp), %ecx
xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
#else
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S Tue Aug 14 00:03:13 2007
@@ -20,6 +20,7 @@
#include <sysdep.h>
#include <lowlevellock.h>
#include <lowlevelrwlock.h>
+#include <kernel-features.h>
.text
@@ -73,7 +74,7 @@
jne 7f
8:
-#if __ASSUME_PRIVATE_FUTEX
+#ifdef __ASSUME_PRIVATE_FUTEX
movzbl PSHARED(%edi), %ecx
xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %ecx
#else
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S Tue Aug 14 00:03:13 2007
@@ -21,6 +21,7 @@
#include <lowlevellock.h>
#include <lowlevelrwlock.h>
#include <pthread-errnos.h>
+#include <kernel-features.h>
.text
@@ -66,7 +67,7 @@
jne 10f
11:
-#if __ASSUME_PRIVATE_FUTEX
+#ifdef __ASSUME_PRIVATE_FUTEX
movzbl PSHARED(%ebx), %ecx
xorl $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
#else
Added: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i786/Implies
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i786/Implies (added)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i786/Implies Tue Aug 14 00:03:13 2007
@@ -1,0 +1,2 @@
+# The PPro and PII cores are mostly the same.
+unix/sysv/linux/i386/i686
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h Tue Aug 14 00:03:13 2007
@@ -83,7 +83,7 @@
? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
: (fl)) \
: ({ unsigned int __fl = ((private) ^ FUTEX_PRIVATE_FLAG); \
- asm ("andl %%fs:%P1, %0" : "+r" (__fl) \
+ asm ("andl %%gs:%P1, %0" : "+r" (__fl) \
: "i" (offsetof (struct pthread, header.private_futex))); \
__fl | (fl); }))
# endif
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h Tue Aug 14 00:03:13 2007
@@ -25,6 +25,7 @@
#include <bits/pthreadtypes.h>
#include <ia64intrin.h>
#include <atomic.h>
+#include <kernel-features.h>
#define __NR_futex 1230
#define FUTEX_WAIT 0
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h Tue Aug 14 00:03:13 2007
@@ -24,6 +24,7 @@
#include <sys/param.h>
#include <bits/pthreadtypes.h>
#include <atomic.h>
+#include <kernel-features.h>
#ifndef __NR_futex
# define __NR_futex 221
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h Tue Aug 14 00:03:13 2007
@@ -24,6 +24,7 @@
#include <sys/param.h>
#include <bits/pthreadtypes.h>
#include <atomic.h>
+#include <kernel-features.h>
#define SYS_futex 238
#define FUTEX_WAIT 0
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S Tue Aug 14 00:03:13 2007
@@ -22,6 +22,7 @@
#include <lowlevelcond.h>
#include <pthread-errnos.h>
#include "lowlevel-atomic.h"
+#include <kernel-features.h>
.text
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h Tue Aug 14 00:03:13 2007
@@ -24,6 +24,7 @@
#include <sys/param.h>
#include <bits/pthreadtypes.h>
#include <atomic.h>
+#include <kernel-features.h>
#define FUTEX_WAIT 0
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S Tue Aug 14 00:03:13 2007
@@ -132,7 +132,7 @@
/* Unlock in loop requires wakeup. */
7: addq $cond_lock-cond_futex, %rdi
- cmpq $-1, dep_mutex-cond_lock(%rdi)
+ cmpq $-1, %r8
movl $LLL_PRIVATE, %eax
movl $LLL_SHARED, %esi
cmovne %eax, %esi
@@ -141,7 +141,7 @@
jmp 8b
9: /* The futex requeue functionality is not available. */
- cmpq $-1, dep_mutex-cond_futex(%rdi)
+ cmpq $-1, %r8
movl $0x7fffffff, %edx
#ifdef __ASSUME_PRIVATE_FUTEX
movl $FUTEX_WAKE, %eax
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S Tue Aug 14 00:03:13 2007
@@ -87,7 +87,7 @@
7: /* %esi should be either FUTEX_WAKE_OP or
FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall. */
- xorl $(FUTEX_WAKE | FUTEX_WAKE_OP), %esi
+ xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %esi
movl $SYS_futex, %eax
/* %rdx should be 1 already from $FUTEX_WAKE_OP syscall.
movl $1, %edx */
Modified: fsf/trunk/libc/nscd/gai.c
==============================================================================
--- fsf/trunk/libc/nscd/gai.c (original)
+++ fsf/trunk/libc/nscd/gai.c Tue Aug 14 00:03:13 2007
@@ -17,6 +17,8 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <alloca.h>
+#include <kernel-features.h>
+
/* This file uses the getaddrinfo code but it compiles it without NSCD
support. We just need a few symbol renames. */
#define __inet_aton inet_aton
Modified: fsf/trunk/libc/nscd/servicescache.c
==============================================================================
--- fsf/trunk/libc/nscd/servicescache.c (original)
+++ fsf/trunk/libc/nscd/servicescache.c Tue Aug 14 00:03:13 2007
@@ -24,6 +24,7 @@
#include <netdb.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <kernel-features.h>
#include "nscd.h"
#include "dbg_log.h"
Modified: fsf/trunk/libc/sysdeps/unix/clock_settime.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/clock_settime.c (original)
+++ fsf/trunk/libc/sysdeps/unix/clock_settime.c Tue Aug 14 00:03:13 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1999-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
@@ -23,7 +23,7 @@
#include <ldsodefs.h>
-#if HP_TIMING_AVAIL
+#if HP_TIMING_AVAIL && !defined HANDLED_CPUTIME
/* Clock frequency of the processor. We make it a 64-bit variable
because some jokers are already playing with processors with more
than 4GHz. */
@@ -33,10 +33,8 @@
/* This function is defined in the thread library. */
extern void __pthread_clock_settime (clockid_t clock_id, hp_timing_t offset)
__attribute__ ((__weak__));
-#endif
-#if HP_TIMING_AVAIL
static int
hp_timing_settime (clockid_t clock_id, const struct timespec *tp)
{
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-osinfo.h Tue Aug 14 00:03:13 2007
@@ -71,6 +71,7 @@
#define ROUND(len) (((len) + sizeof note->n_type - 1) & -sizeof note->n_type)
note = ((const void *) (note + 1)
+ ROUND (note->n_namesz) + ROUND (note->n_descsz));
+#undef ROUND
}
}
}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.c Tue Aug 14 00:03:13 2007
@@ -18,7 +18,6 @@
02111-1307 USA. */
#include "config.h"
-#include <dl-hash.h>
#include <ldsodefs.h>
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-vdso.h Tue Aug 14 00:03:13 2007
@@ -21,9 +21,14 @@
#define _DL_VDSO_H 1
#include <assert.h>
-#include <dl-hash.h>
#include <ldsodefs.h>
+#ifdef NDEBUG
+# define CHECK_HASH(var) do {} while (0)
+#else
+# include <dl-hash.h>
+# define CHECK_HASH(var) assert (var.hash == _dl_elf_hash (var.name))
+#endif
/* Create version number record for lookup. */
#define PREPARE_VERSION(var, vname, vhash) \
@@ -31,7 +36,7 @@
var.name = vname; \
var.hidden = 1; \
var.hash = vhash; \
- assert (var.hash == _dl_elf_hash (vname)); \
+ CHECK_HASH (var); \
/* We don't have a specific file where the symbol can be found. */ \
var.filename = NULL
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/fstatfs64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/fstatfs64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/fstatfs64.c Tue Aug 14 00:03:13 2007
@@ -1,5 +1,6 @@
/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2003,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
@@ -22,6 +23,7 @@
#include <sys/statfs.h>
#include <stddef.h>
#include <sysdep.h>
+#include <kernel-features.h>
/* Defined in statfs64.c. */
extern int __no_statfs64 attribute_hidden;
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/fxstatat.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/fxstatat.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/fxstatat.c Tue Aug 14 00:03:13 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
@@ -30,6 +30,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
#include <bp-checks.h>
+#include <kernel-features.h>
#include <xstatconv.h>
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/if_index.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/if_index.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/if_index.c Tue Aug 14 00:03:13 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -28,6 +28,7 @@
#include <sys/ioctl.h>
#include <bits/libc-lock.h>
#include <not-cancel.h>
+#include <kernel-features.h>
#include "netlinkaccess.h"
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ifaddrs.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ifaddrs.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ifaddrs.c Tue Aug 14 00:03:13 2007
@@ -33,6 +33,7 @@
#include <sysdep.h>
#include <time.h>
#include <unistd.h>
+#include <kernel-features.h>
#include "netlinkaccess.h"
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Tue Aug 14 00:03:13 2007
@@ -428,29 +428,37 @@
# define __ASSUME_TMPFS_NAME 1
#endif
-/* pselect was introduced just after 2.6.16-rc1. Due to the way the
- kernel versions are advertised we can only rely on 2.6.17 to have
- the code. */
-#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __x86_64__
+/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way
+ the kernel versions are advertised we can only rely on 2.6.17 to have
+ the code. On x86_64 and SH this appeared first in 2.6.19-rc1,
+ on ia64 in 2.6.22-rc1 and on alpha just after 2.6.22-rc1. */
+#if __LINUX_KERNEL_VERSION >= 0x020611 \
+ && ((!defined __x86_64__ && !defined __sh__ && !defined __ia64__ \
+ && !defined __alpha__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020613 \
+ && (defined __x86_64__ || defined __sh__)) \
+ || (__LINUX_KERNEL_VERSION >= 0x020616 && defined __ia64__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
# define __ASSUME_PSELECT 1
-#endif
-
-/* ppoll was introduced just after 2.6.16-rc1. Due to the way the
- kernel versions are advertised we can only rely on 2.6.17 to have
- the code. */
-#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __x86_64__
-# define __ASSUME_PPOLL 1
+# define __ASSUME_PPOLL 1
#endif
/* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the
kernel versions are advertised we can only rely on 2.6.17 to have
- the code. */
-#if __LINUX_KERNEL_VERSION >= 0x020611
+ the code. On PPC they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1
+ and on Alpha just after 2.6.22-rc1. */
+#if __LINUX_KERNEL_VERSION >= 0x020611 \
+ && ((!defined __sh__ && !defined __alpha__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
# define __ASSUME_ATFCTS 1
#endif
/* Support for inter-process robust mutexes was added in 2.6.17. */
-#if __LINUX_KERNEL_VERSION >= 0x020611
+#if __LINUX_KERNEL_VERSION >= 0x020611 \
+ && ((!defined __sh__ && !defined __alpha__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
# define __ASSUME_SET_ROBUST_LIST 1
#endif
@@ -459,8 +467,11 @@
# define __ASSUME_FUTEX_LOCK_PI 1
#endif
-/* Support for utimensat syscall was added in 2.6.22. */
-#if __LINUX_KERNEL_VERSION >= 0x020616
+/* Support for utimensat syscall was added in 2.6.22, on alpha and s390
+ only after 2.6.22-rc1. */
+#if __LINUX_KERNEL_VERSION >= 0x020616 \
+ && ((!defined __sh__ && !defined __alpha__) \
+ || __LINUX_KERNEL_VERSION >= 0x020617)
# define __ASSUME_UTIMENSAT 1
#endif
@@ -469,7 +480,10 @@
# define __ASSUME_PRIVATE_FUTEX 1
#endif
-/* Support for fallocate was added in 2.6.23. */
-#if __LINUX_KERNEL_VERSION >= 0x020617
+/* Support for fallocate was added in 2.6.23, on s390
+ only after 2.6.23-rc1. */
+#if __LINUX_KERNEL_VERSION >= 0x020617 \
+ && ((!defined __s390__ && !defined __alpha__) \
+ || (__LINUX_KERNEL_VERSION >= 0x020618 && defined __s390__))
# define __ASSUME_FALLOCATE 1
#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ppoll.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ppoll.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ppoll.c Tue Aug 14 00:03:13 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2006.
@@ -26,9 +26,11 @@
#ifdef __NR_ppoll
+# ifndef __ASSUME_PPOLL
static int __generic_ppoll (struct pollfd *fds, nfds_t nfds,
const struct timespec *timeout,
const sigset_t *sigmask);
+# endif
int
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/pselect.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/pselect.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/pselect.c Tue Aug 14 00:03:13 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2006.
@@ -26,10 +26,12 @@
#ifdef __NR_pselect6
+# ifndef __ASSUME_PSELECT
static int __generic_pselect (int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds,
const struct timespec *timeout,
const sigset_t *sigmask);
+# endif
int
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S Tue Aug 14 00:03:13 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
This file is part of the GNU C Library.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <kernel-features.h>
#define EINVAL 22
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S Tue Aug 14 00:03:13 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
This file is part of the GNU C Library.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <kernel-features.h>
#define EINVAL 22
#define ENOSYS 38
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c Tue Aug 14 00:03:13 2007
@@ -1,3 +1,5 @@
+#include <kernel-features.h>
+
#include "../../i386/xstat.c"
#ifdef __NR_stat64
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/statfs64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/statfs64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/statfs64.c Tue Aug 14 00:03:13 2007
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FILE resides.
- Copyright (C) 1996-2000,2003,2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2000,2003,2004,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
@@ -22,6 +22,7 @@
#include <sys/statfs.h>
#include <stddef.h>
#include <sysdep.h>
+#include <kernel-features.h>
# if __ASSUME_STATFS64 == 0
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S Tue Aug 14 00:03:13 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.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,12 @@
/* Align stack. */
sub $0x8, %rsp
cfi_adjust_cfa_offset(8)
+#ifdef SHARED
+ movq __vdso_gettimeofday(%rip), %rax
+ PTR_DEMANGLE (%rax)
+#else
movq $VSYSCALL_ADDR_vgettimeofday, %rax
+#endif
callq *%rax
/* Check error return. */
cmpl $-4095, %eax
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/libc-start.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/libc-start.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/x86_64/libc-start.c Tue Aug 14 00:03:13 2007
@@ -31,6 +31,10 @@
PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
void *p = _dl_vdso_vsym ("gettimeofday", &linux26);
+ /* If the vDSO is not available we fall back on the old vsyscall. */
+#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000ul
+ if (p == NULL)
+ p = (void *) VSYSCALL_ADDR_vgettimeofday;
PTR_MANGLE (p);
__vdso_gettimeofday = p;
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/xstatconv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/xstatconv.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/xstatconv.c Tue Aug 14 00:03:13 2007
@@ -1,5 +1,6 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
+ Copyright (C) 1991,1995-1997,2000,2002,2003,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 +21,7 @@
#include <errno.h>
#include <sys/stat.h>
#include <kernel_stat.h>
+#include <kernel-features.h>
#ifdef STAT_IS_KERNEL_STAT