[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r2417 - in /fsf/trunk/ports: ./ sysdeps/arm/nptl/ sysdeps/mips/nptl/ sysdeps/unix/sysv/linux/arm/nptl/ sysdeps/unix/sysv/lin...
- To: commits@xxxxxxxxxx
- Subject: [commits] r2417 - in /fsf/trunk/ports: ./ sysdeps/arm/nptl/ sysdeps/mips/nptl/ sysdeps/unix/sysv/linux/arm/nptl/ sysdeps/unix/sysv/lin...
- From: eglibc@xxxxxxxxxx
- Date: Wed, 06 Jun 2007 17:31:43 -0000
Author: eglibc
Date: Wed Jun 6 10:31:41 2007
New Revision: 2417
Log:
Import glibc-ports-mainline for 2007-06-06
Modified:
fsf/trunk/ports/ChangeLog.arm
fsf/trunk/ports/ChangeLog.mips
fsf/trunk/ports/sysdeps/arm/nptl/tls.h
fsf/trunk/ports/sysdeps/mips/nptl/tls.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
Modified: fsf/trunk/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/ports/ChangeLog.arm (original)
+++ fsf/trunk/ports/ChangeLog.arm Wed Jun 6 10:31:41 2007
@@ -1,3 +1,20 @@
+2007-06-06 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+ (lll_unlock_wake_cb): Delete.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+ (FUTEX_PRIVATE_FLAG): Define.
+ (lll_unlock_wake_cb): Delete prototype.
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Include
+ <endian.h>.
+ (pthread_rwlock_t): Shrink __flags and add __shared.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+ (RTLD_SINGLE_THREAD_P): Define.
+
2007-05-23 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/kernel-features.h
Modified: fsf/trunk/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/ports/ChangeLog.mips (original)
+++ fsf/trunk/ports/ChangeLog.mips Wed Jun 6 10:31:41 2007
@@ -1,3 +1,16 @@
+2007-06-06 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+ (FUTEX_PRIVATE_FLAG): Define.
+ (lll_unlock_wake_cb): Delete prototype.
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Include
+ <endian.h>.
+ (pthread_rwlock_t): Shrink __flags and add __shared.
+
2007-05-24 Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
Modified: fsf/trunk/ports/sysdeps/arm/nptl/tls.h
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/nptl/tls.h (original)
+++ fsf/trunk/ports/sysdeps/arm/nptl/tls.h Wed Jun 6 10:31:41 2007
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/ARM version.
- 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
@@ -132,6 +132,29 @@
is not available. */
#define TLS_INIT_TP_EXPENSIVE 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: fsf/trunk/ports/sysdeps/mips/nptl/tls.h
==============================================================================
--- fsf/trunk/ports/sysdeps/mips/nptl/tls.h (original)
+++ fsf/trunk/ports/sysdeps/mips/nptl/tls.h Wed Jun 6 10:31:41 2007
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/MIPS version.
- 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
@@ -156,6 +156,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: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h Wed Jun 6 10:31:41 2007
@@ -18,6 +18,8 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+
+#include <endian.h>
#define __SIZEOF_PTHREAD_ATTR_T 36
#define __SIZEOF_PTHREAD_MUTEX_T 24
@@ -126,9 +128,21 @@
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+#else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
int __writer;
} __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c Wed Jun 6 10:31:41 2007
@@ -1,5 +1,5 @@
/* low level locking for pthread library. Generic futex-using version.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 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
@@ -63,20 +63,8 @@
}
-/* These don't get included in libc.so */
+/* This function doesn't get included in libc.so */
#ifdef IS_IN_libpthread
-int
-lll_unlock_wake_cb (int *futex)
-{
- int val = atomic_exchange_rel (futex, 0);
-
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
-
- return 0;
-}
-
-
int
__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
{
@@ -114,5 +102,4 @@
return 0;
}
-
#endif
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h Wed Jun 6 10:31:41 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
@@ -34,6 +34,7 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -267,8 +268,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: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h Wed Jun 6 10:31:41 2007
@@ -126,3 +126,9 @@
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h Wed Jun 6 10:31:41 2007
@@ -19,6 +19,8 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+
+#include <endian.h>
#if _MIPS_SIM == _ABI64
# define __SIZEOF_PTHREAD_ATTR_T 56
@@ -157,9 +159,9 @@
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
- int __pad1;
+ int __shared;
+ unsigned long int __pad1;
unsigned long int __pad2;
- unsigned long int __pad3;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
@@ -173,9 +175,21 @@
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+#else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
int __writer;
} __data;
# endif
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h Wed Jun 6 10:31:41 2007
@@ -1,4 +1,4 @@
-/* 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
@@ -35,6 +35,7 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -233,8 +234,6 @@
/* Initializers for lock. */
#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