diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2011-11-17 21:56:08 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2011-11-17 21:56:08 +0000 |
commit | 913a0f6c362c8c9aac72f800485678845a60ed06 (patch) | |
tree | 227afb2373db8f9494b69c20069cce6a03ab0914 /libc/nptl | |
parent | 86abb02796d5bfc0c71d46ad9923ff8737e03280 (diff) |
Merge changes between r15584 and r15868 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@15869 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/nptl')
-rw-r--r-- | libc/nptl/ChangeLog | 20 | ||||
-rw-r--r-- | libc/nptl/pthread_getattr_np.c | 6 | ||||
-rw-r--r-- | libc/nptl/semaphore.h | 6 | ||||
-rw-r--r-- | libc/nptl/sysdeps/pthread/pthread.h | 38 | ||||
-rw-r--r-- | libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S | 6 |
5 files changed, 48 insertions, 28 deletions
diff --git a/libc/nptl/ChangeLog b/libc/nptl/ChangeLog index f4b2f04c0..9abaa26ba 100644 --- a/libc/nptl/ChangeLog +++ b/libc/nptl/ChangeLog @@ -1,3 +1,23 @@ +2011-11-15 Ulrich Drepper <drepper@gmail.com> + + * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for + /proc/self/maps. + +2011-10-29 Ulrich Drepper <drepper@gmail.com> + + [BZ #13358] + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S + (__pthread_cond_timedwait): Initialize %r15 correctly also for code + path for kernels with FUTEX_CLOCK_REALTIME. + Debugged by H.J. Lu <hjl.tools@gmail.com>. + +2011-10-27 Andreas Schwab <schwab@redhat.com> + + [BZ #13344] + * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD + for memory synchronization functions. + * semaphore.h: Likewise. + 2011-10-24 Ulrich Drepper <drepper@gmail.com> * tst-cancel7.c: Avoid warning. diff --git a/libc/nptl/pthread_getattr_np.c b/libc/nptl/pthread_getattr_np.c index 9c25caff8..f03c97899 100644 --- a/libc/nptl/pthread_getattr_np.c +++ b/libc/nptl/pthread_getattr_np.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002-2004, 2006, 2007, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -75,7 +75,7 @@ pthread_getattr_np (thread_id, attr) /* The safest way to get the top of the stack is to read /proc/self/maps and locate the line into which __libc_stack_end falls. */ - FILE *fp = fopen ("/proc/self/maps", "rc"); + FILE *fp = fopen ("/proc/self/maps", "rce"); if (fp == NULL) ret = errno; /* We need the limit of the stack in any case. */ @@ -164,7 +164,7 @@ pthread_getattr_np (thread_id, attr) { free (cpuset); if (ret == ENOSYS) - { + { /* There is no such functionality. */ ret = 0; iattr->cpuset = NULL; diff --git a/libc/nptl/semaphore.h b/libc/nptl/semaphore.h index 4f13725b3..11caf664a 100644 --- a/libc/nptl/semaphore.h +++ b/libc/nptl/semaphore.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2011 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 @@ -64,10 +64,10 @@ extern int sem_timedwait (sem_t *__restrict __sem, #endif /* Test whether SEM is posted. */ -extern int sem_trywait (sem_t *__sem) __THROW; +extern int sem_trywait (sem_t *__sem) __THROWNL; /* Post SEM. */ -extern int sem_post (sem_t *__sem) __THROW; +extern int sem_post (sem_t *__sem) __THROWNL; /* Get current value of SEM and store it in *SVAL. */ extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval) diff --git a/libc/nptl/sysdeps/pthread/pthread.h b/libc/nptl/sysdeps/pthread/pthread.h index 4c8366545..a92428162 100644 --- a/libc/nptl/sysdeps/pthread/pthread.h +++ b/libc/nptl/sysdeps/pthread/pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -225,7 +225,7 @@ __BEGIN_DECLS extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), - void *__restrict __arg) __THROW __nonnull ((1, 3)); + void *__restrict __arg) __THROWNL __nonnull ((1, 3)); /* Terminate calling thread. @@ -740,22 +740,22 @@ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) /* Try locking a mutex. */ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Lock a mutex. */ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + __abstime) __THROWNL __nonnull ((1, 2)); #endif /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Get the priority ceiling of MUTEX. */ @@ -879,37 +879,37 @@ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) /* Acquire read lock for RWLOCK. */ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + __abstime) __THROWNL __nonnull ((1, 2)); # endif /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict - __abstime) __THROW __nonnull ((1, 2)); + __abstime) __THROWNL __nonnull ((1, 2)); # endif /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Functions for handling read-write lock attributes. */ @@ -959,11 +959,11 @@ extern int pthread_cond_destroy (pthread_cond_t *__cond) /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. @@ -1034,15 +1034,15 @@ extern int pthread_spin_destroy (pthread_spinlock_t *__lock) /* Wait until spinlock LOCK is retrieved. */ extern int pthread_spin_lock (pthread_spinlock_t *__lock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Try to lock spinlock LOCK. */ extern int pthread_spin_trylock (pthread_spinlock_t *__lock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Release spinlock LOCK. */ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Functions to handle barriers. */ @@ -1060,7 +1060,7 @@ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) /* Wait on barrier BARRIER. */ extern int pthread_barrier_wait (pthread_barrier_t *__barrier) - __THROW __nonnull ((1)); + __THROWNL __nonnull ((1)); /* Initialize barrier attribute ATTR. */ diff --git a/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S index d11b29746..acbd3fa53 100644 --- a/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ b/libc/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -101,6 +101,8 @@ __pthread_cond_timedwait: movq %rsi, dep_mutex(%rdi) 22: + xorl %r15d, %r15d + #ifndef __ASSUME_FUTEX_CLOCK_REALTIME # ifdef PIC cmpl $0, __have_futex_clock_realtime(%rip) @@ -402,8 +404,6 @@ __pthread_cond_timedwait: #ifndef __ASSUME_FUTEX_CLOCK_REALTIME .Lreltmo: - xorl %r15d, %r15d - /* Get internal lock. */ movl $1, %esi xorl %eax, %eax |