[BZ #2526, BZ #3138, BZ #3143]
[platform/upstream/glibc.git] / nptl / ChangeLog
index 3ad04ed..6c7fd49 100644 (file)
@@ -1,3 +1,366 @@
+2006-09-12  Ulrich Drepper  <drepper@redhat.com>
+
+       * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
+       to guarantee the thread is always canceled.
+
+2006-09-08  Jakub Jelinek  <jakub@redhat.com>
+
+       * tst-cond22.c: Include pthread.h instead of pthreadP.h.
+       Include stdlib.h.
+       * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
+       increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+                                                       
+2006-09-08  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #3123]
+       * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
+       increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+       * Makefile (tests): Add tst-cond22.
+       * tst-cond22.c: New file.
+
+2006-09-05  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #3124]
+       * descr.h (struct pthread): Add parent_cancelhandling.
+       * sysdeps/pthread/createthread.c (create_thread): Pass parent
+       cancelhandling value to child.
+       * pthread_create.c (start_thread): If parent thread was canceled
+       reset the SIGCANCEL mask.
+       * Makefile (tests): Add tst-cancel25.
+       * tst-cancel25.c: New file.
+
+2006-09-05  Jakub Jelinek  <jakub@redhat.com>
+            Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
+       counterp if it is already zero.
+       * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
+
+2006-03-04  Jakub Jelinek  <jakub@redhat.com>
+            Roland McGrath  <roland@redhat.com>
+
+       * sysdeps/unix/sysv/linux/i386/lowlevellock.h
+       (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
+       LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
+       (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
+       lll_robust_mutex_cond_lock, lll_mutex_timedlock,
+       lll_robust_mutex_timedlock, lll_mutex_unlock,
+       lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
+       Add _L_*_ symbols around the subsection.
+       * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
+       * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
+
+2006-03-03  Jakub Jelinek  <jakub@redhat.com>
+            Roland McGrath  <roland@redhat.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+       (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
+       LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
+       (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
+       lll_robust_mutex_cond_lock, lll_mutex_timedlock,
+       lll_robust_mutex_timedlock, lll_mutex_unlock,
+       lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
+       Add _L_*_ symbols around the subsection.
+       * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
+       * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
+
+2006-08-31  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
+       change because it can disturb too much existing code.  If real hard
+       reader preference is needed we'll introduce another type.
+       * sysdeps/pthread/pthread_rwlock_timedwrlock.c
+       (pthread_rwlock_timedwrlock): Likewise.
+       * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
+       Likewise.
+
+2006-08-30  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
+       reader preference.
+       * sysdeps/pthread/pthread_rwlock_timedwrlock.c
+       (pthread_rwlock_timedwrlock): Likewise.
+       * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
+       Likewise.
+
+2006-08-25  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
+       Only define ifdef SHARED.
+
+2006-08-23  Ulrich Drepper  <drepper@redhat.com>
+
+       * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
+       (free_stacks): ...here.
+       (__free_stack_cache): New function.
+       * pthreadP.h: Declare __free_stack_cache.
+       * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
+       ptr_freeres.
+       * init.c (pthread_functions): Initialize ptr_freeres.
+       * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
+       New freeres function.
+
+2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
+
+       [BZ #3018]
+       * Makefile (extra-objs): Add modules to extra-test-objs instead.
+
+2006-08-20  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
+       _XOPEN_REALTIME_THREADS.
+
+2006-08-15  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
+       HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
+       HAVE_CLOCK_GETTIME_VSYSCALL.
+       (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
+
+2006-08-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/bits/posix_opt.h
+       (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
+       * descr.h (struct priority_protection_data): New type.
+       (struct pthread): Add tpp field.
+       * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
+       PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
+       PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
+       * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
+       TPP mutexes.
+       * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
+       * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
+       * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
+       * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
+       * tpp.c: New file.
+       * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
+       boosted by TPP.
+       * pthread_setschedprio.c (pthread_setschedprio): Likewise.
+       * pthread_mutexattr_getprioceiling.c
+       (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
+       in the SCHED_FIFO priority range.
+       * pthread_mutexattr_setprioceiling.c
+       (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
+       * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
+       if mutex is not TPP.  Ceiling is now in __data.__lock.
+       * pthread_mutex_setprioceiling.c: Include stdbool.h.
+       (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
+       is now in __data.__lock.  Add locking.
+       * pthread_create.c (__free_tcb): Free pd->tpp structure.
+       * Makefile (libpthread-routines): Add tpp.
+       (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
+       * tst-tpp.h: New file.
+       * tst-mutexpp1.c: New file.
+       * tst-mutexpp6.c: New file.
+       * tst-mutexpp10.c: New file.
+       * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
+       * tst-mutex6.c (TEST_FUNCTION): Likewise.
+
+2006-08-12  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2843]
+       * pthread_join.c (pthread_join): Account for self being canceled
+       when checking for deadlocks.
+       * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
+       (tf1): Don't print anything after pthread_join returns, this would be
+       another cancellation point.
+       (tf2): Likewise.
+       * tst-join6.c: New file.
+       * Makefile (tests): Add tst-join6.
+
+2006-08-03  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2892]
+       * pthread_setspecific.c (__pthread_setspecific): Check
+       out-of-range index before checking for unused key.
+
+       * sysdeps/pthread/gai_misc.h: New file.
+
+2006-08-01  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
+       file.  Don't use sysctl.
+       * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
+       overwrite the file if this is likely not true.
+
+2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
+       * Makefile (tests): Add tst-getpid3.
+       * tst-getpid3.c: New file.
+
+2006-07-30  Roland McGrath  <roland@redhat.com>
+
+       * Makefile (libpthread-routines): Add ptw-sigsuspend.
+
+       * sysdeps/unix/sysv/linux/i386/not-cancel.h
+       (pause_not_cancel): New macro.
+       (nanosleep_not_cancel): New macro.
+       (sigsuspend_not_cancel): New macro.
+       * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
+       nanosleep_not_cancel macro from <not-cancel.h>.
+       * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
+       macro from <not-cancel.h>.
+
+2006-07-28  Ulrich Drepper  <drepper@redhat.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
+       notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
+       * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
+       * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
+       * pthread_mutex_init.c: Add support for priority inheritance mutex.
+       * pthread_mutex_lock.c: Likewise.
+       * pthread_mutex_timedlock.c: Likewise.
+       * pthread_mutex_trylock.c: Likewise.
+       * pthread_mutex_unlock.c: Likewise.
+       * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
+       all mutexes.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
+       * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
+       * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
+       pthread-pi-defines.sym.
+       * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
+       FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
+       * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
+       * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: 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.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
+       * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
+       _POSIX_THREAD_PRIO_INHERIT to 200112L.
+       * tst-mutex1.c: Adjust to allow use in PI mutex test.
+       * tst-mutex2.c: Likewise.
+       * tst-mutex3.c: Likewise.
+       * tst-mutex4.c: Likewise.
+       * tst-mutex5.c: Likewise.
+       * tst-mutex6.c: Likewise.
+       * tst-mutex7.c: Likewise.
+       * tst-mutex7a.c: Likewise.
+       * tst-mutex8.c: Likewise.
+       * tst-mutex9.c: Likewise.
+       * tst-robust1.c: Likewise.
+       * tst-robust7.c: Likewise.
+       * tst-robust8.c: Likewise.
+       * tst-mutexpi1.c: New file.
+       * tst-mutexpi2.c: New file.
+       * tst-mutexpi3.c: New file.
+       * tst-mutexpi4.c: New file.
+       * tst-mutexpi5.c: New file.
+       * tst-mutexpi6.c: New file.
+       * tst-mutexpi7.c: New file.
+       * tst-mutexpi7a.c: New file.
+       * tst-mutexpi8.c: New file.
+       * tst-mutexpi9.c: New file.
+       * tst-robust1.c: New file.
+       * tst-robust2.c: New file.
+       * tst-robust3.c: New file.
+       * tst-robust4.c: New file.
+       * tst-robust5.c: New file.
+       * tst-robust6.c: New file.
+       * tst-robust7.c: New file.
+       * tst-robust8.c: New file.
+       * Makefile (tests): Add the new tests.
+
+       * pthread_create.c (start_thread): Add some casts to avoid warnings.
+       * pthread_mutex_destroy.c: Remove unneeded label.
+
+2006-07-01  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_mutex_init.c (__pthread_mutex_init): Move some
+       computations to compile time.
+
+2006-06-04  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
+
+2006-05-15  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
+
+2006-05-11  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_key_create.c (__pthread_key_create): Do away with
+       __pthread_keys_lock.
+
+       * sysdeps/unix/sysv/linux/pthread_setaffinity.c
+       (__kernel_cpumask_size): Mark as hidden.
+       * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
+
+       * sem_open.c (__sem_mappings_lock): Mark as hidden.
+       * semaphoreP.h (__sem_mappings_lock): Likewise.
+
+2006-05-10  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_atfork.c: Mark __dso_handle as hidden.
+
+2006-05-09  Ulrich Drepper  <drepper@redhat.com>
+
+       [BZ #2644]
+       * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
+       the reload problem.  Change the one path in pthread_cancel_init
+       which causes the problem.  Force gcc to reload.  Simplify callers.
+       * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
+       (_Unwind_GetBSP): Undo last patch.
+
+2006-05-07  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
+       function pointer is reloaded after pthread_cancel_init calls.
+
+       [BZ #2644]
+       * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
+       pointers are reloaded after pthread_cancel_init calls.
+
+2006-05-01  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
+       __always_inline.
+
+2006-04-27  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
+       Allocate new object which is passed to timer_sigev_thread so that
+       the timer can be deleted before the new thread is scheduled.
+
+2006-04-26  Roland McGrath  <roland@redhat.com>
+
+       * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
+
+2006-04-08  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
+       suffix for conditional jumps.
+       * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
+       * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
+
+       * init.c (sigcancel_handler): Compare with correct PID even if the
+       thread is in the middle of a fork call.
+       (sighandler_setxid): Likewise.
+       Reported by Suzuki K P <suzuki@in.ibm.com> .
+
+2006-04-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
+
+2006-04-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
+       fails [Coverity CID 105].
+
 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/pthread/pthread.h: Add nonnull attributes.