summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-29Merge branch 'master' into 2.262.26Samuel Thibault
2017-12-27Make pthread_mutex use gsyncAgustina Arzille
* Makefile (libpthread-routines): Add pt-mutexattr-getrobust pt-mutexattr-setrobust pt-mutex-consistent. * include/pthread/pthreadtypes.h (__pthread_mutex_robustness): New enum, containing __PTHREAD_MUTEX_STALLED, __PTHREAD_MUTEX_ROBUST. * include/pthread/pthread.h [__USE_XOPEN2K] (PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST): New macros. [__USE_XOPEN2K8] (pthread_mutex_consistent, pthread_mutex_consistent_np): New declarations. * sysdeps/mach/hurd/bits/mutex.h sysdeps/mach/hurd/pt-mutex-consistent.c sysdeps/mach/hurd/pt-mutex-destroy.c sysdeps/mach/hurd/pt-mutex-getprioceiling.c sysdeps/mach/hurd/pt-mutex-init.c sysdeps/mach/hurd/pt-mutex-lock.c sysdeps/mach/hurd/pt-mutex-setprioceiling.c sysdeps/mach/hurd/pt-mutex-timedlock.c sysdeps/mach/hurd/pt-mutex-transfer-np.c sysdeps/mach/hurd/pt-mutex-trylock.c sysdeps/mach/hurd/pt-mutex-unlock.c sysdeps/mach/hurd/pt-mutex.h sysdeps/mach/hurd/pt-mutexattr-destroy.c sysdeps/mach/hurd/pt-mutexattr-getprioceiling.c sysdeps/mach/hurd/pt-mutexattr-getprotocol.c sysdeps/mach/hurd/pt-mutexattr-getpshared.c sysdeps/mach/hurd/pt-mutexattr-getrobust.c sysdeps/mach/hurd/pt-mutexattr-gettype.c sysdeps/mach/hurd/pt-mutexattr-init.c sysdeps/mach/hurd/pt-mutexattr-setprioceiling.c sysdeps/mach/hurd/pt-mutexattr-setprotocol.c sysdeps/mach/hurd/pt-mutexattr-setpshared.c sysdeps/mach/hurd/pt-mutexattr-setrobust.c sysdeps/mach/hurd/pt-mutexattr-settype.c sysdeps/mach/hurd/pt-mutexattr.c: New files
2017-11-05Make pthread_spinlock use gsyncAgustina Arzille
* pthread/pt-spin-inlines.c (pthread_spin_lock): Define weak alias for __pthread_spin_lock. * sysdeps/mach/bits/spin-lock-inline.h: Include <lock-intern.h> instead of <machine-lock.h>. (__pthread_spin_trylock, __pthread_spin_unlock): Use __spin_lock_t type instead of __lock. (__pthread_spin_lock): Define as inline only, use __spin_lock and __spin_lock_t type. * sysdeps/mach/bits/spin-lock.h: Do not include <machine-lock.h> (__pthread_spinlock_t): Use volatile int instead of __spin_lock_t. (__PTHREAD_SPIN_LOCK_INITIALIZER): Define to 0. * sysdeps/mach/i386/bits/spin-lock-inline.h: Remove file. * sysdeps/mach/i386/bits/spin-lock.h: Remove file. * sysdeps/posix/pt-spin.c (pthread_spin_lock, __pthread_spin_lock): Remove weak aliases, provided by pt-spin-inlines.c
2017-11-05Install missing headersSamuel Thibault
* Makefile (headers): Add bits/pthreadtypes-arch.h and bits/thread-shared-types.h.
2017-11-05Add missing internal namesSamuel Thibault
Follow-up 2b7d0800f314e0abf370b2b6f6272a2ddb875464 ('Fix exposing symbols') * sysdeps/generic/pt-mutexattr-destroy.c (__pthread_mutexattr_destroy): Define. (pthread_mutexattr_destroy): Redefine as alias. * sysdeps/generic/pt-mutexattr-init.c (__pthread_mutexattr_init): Define. (pthread_mutexattr_init): Redefine as alias. * sysdeps/generic/pt-mutexattr-settype.c (__pthread_mutexattr_settype): Define. (pthread_mutexattr_settype): Redefine as alias.
2017-09-26Avoid exposing mach_port_set_qlimitSamuel Thibault
* sysdeps/mach/pt-thread-alloc.c (create_wakeupmsg): Call __mach_port_set_qlimit instead of mach_port_set_qlimit.
2017-09-26Remove libihash useSamuel Thibault
It poses compilation bootstrapping inconvenience, non-standard symbol exposition, and this is overkill, considering the usual use of TSD, and the availability of TLS. * sysdeps/hurd/pt-key.h: Do not include <hurd/ihash.h>. (PTHREAD_KEY_MEMBERS): Turn thread_specifics to a void**, add unsigned thread_specifics_size. * sysdeps/hurd/pt-init-specific.c (__pthread_init_specific): Initialize thread_specifics_size to 0. * sysdeps/hurd/pt-setspecific.c: Do not include <hurd/ihash.h>. (__pthread_setspecific): Expand and access thread_specifics array instead of hash table. * sysdeps/hurd/pt-getspecific.c: Do not include <hurd/ihash.h>. (__pthread_getspecific): Access thread_specifics array instead of hash table. * sysdeps/hurd/pt-key-delete.c (pthread_key_delete): Clean thread_specifics array instead of hash table. * sysdeps/hurd/pt-destroy-specific.c: Do not include <hurd/ihash.h>. (__pthread_destroy_specific): Clean and free thread_specifics array instead of hash table. * Makeconfig (LDLIBS-tst-interpose-static-thread): Remove -lihash. (LDLIBS-tst-linkall-static): Remove -lihash. * Makefile (HURDLIBS): Remove ihash. (LDLIBS-pthread.so): Remove -lihash. * libpthread.a: Remove -lihash. * libpthread_pic.a: Remove -lihash_pic.
2017-09-25Fix symbol expositionSamuel Thibault
* sysdeps/generic/pt-rwlock-rdlock.c (pthread_rwlock_rdlock): Make alias weak. * sysdeps/generic/pt-rwlock-unlock.c (pthread_rwlock_unlock): Likewise. * sysdeps/generic/pt-rwlock-wrlock.c (pthread_rwlock_wrlock): Likewise. * sysdeps/generic/sem-timedwait.c (sem_timedwait): Likewise. * sysdeps/generic/pt-rwlock-timedrdlock.c (pthread_rwlock_timedrdlock): Make it a weak alias. * sysdeps/generic/pt-rwlock-timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
2017-09-25Fix exposing symbolsSamuel Thibault
* sysdeps/hurd/pt-key.h (__pthread_key_lock_ready): Use __pthread_mutexattr_init, __pthread_mutexattr_settype, _pthread_mutex_init, __pthread_mutexattr_destroy, __pthread_once instead of pthread_mutexattr_init, pthread_mutexattr_settype,pthread_mutex_init, pthread_mutexattr_destroy, pthread_once.
2017-09-24Fix symbols exposed in linkspaceSamuel Thibault
Libc uses some thread functions, but should not expose the corresponding symbols, so use aliases. * Versions (__cthread_detach, __cthread_fork, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific, __pthread_getattr_np, __pthread_attr_getstack): Add symbols * pthread/cthreads-compat.c (cthread_t, cthread_fn_t, cthread_key_t): Do not define. (cthread_detach): Rename to __cthread_detach. (cthread_detach): Define as weak alias to __cthread_detach. (cthread_fork, cthread_keycreate, cthread_getspecific, cthread_setspecific): Likewise. * pthread/pt-getattr.c (pthread_getattr_np): Likewise. * sysdeps/generic/pt-attr-getstack.c (pthread_attr_getstack): Likewise. * sysdeps/pthread/pthread.h (__cthread_t, __cthread_key_t, __cthread_fn_t, __cthread_fork, __cthread_detach, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific, __pthread_getattr_np, __pthread_attr_getstack): Declare.
2017-09-17Fix build with hidden symbolsSamuel Thibault
* forward.c (__register_atfork): Add missing def for hidden symbol.
2017-09-03Add headers wanted by glibc 2.26Samuel Thibault
* sysdeps/i386/bits/pthreadtypes-arch.h: New file. * sysdeps/pthread/bits/thread-shared-types.h: New file. * sysdeps/pthread/bits/pthreadtypes.h: Include <thread-shared-types.h>
2017-09-03Fix link with glibc 2.26Samuel Thibault
* sysdeps/mach/hurd/pt-sigstate.c: Include <sigsetops.h>
2017-09-03Fix build with glibc 2.26Samuel Thibault
* sysdeps/generic/pt-attr.c (__pthread_default_attr.__schedparam): Use __sched_priority field name instead of sched_priority.
2017-08-28Implement basic pthread_getschedparamSamuel Thibault
* sysdeps/generic/pt-getschedparam.c (__pthread_getschedparam): Return SCHED_OTHER and priority 0. Remove stub warning.
2017-08-03Move pthread.h to where glibc will find itSamuel Thibault
* include/pthread.h: Move to... * sysdeps/pthread/pthread.h: ... here.
2017-08-03Fix linking glibc 2.25 testsSamuel Thibault
* Makeconfig [($(subdir) == malloc] (LDLIBS-tst-interpose-static-thread): Add -lihash. [($(subdir) == elf] (LDLIBS-tst-linkall-static): Add -lihash.
2017-08-03Revert "Make statically linking libpthread pull libihash"Samuel Thibault
This reverts commit d3b47d4482e0c8372f51472d9d075a89759919ea. The variable is actually used for dependencies as well.
2017-08-03Make statically linking libpthread pull libihashSamuel Thibault
This is used by tests link, which would fail linking if libihash is not brought in. * Makeconfig (static-thread-library): Add -lihash.
2016-11-01Do not inline pthread_spin_lock_*glibc-2.23-hurd+libpthread-20161218Samuel Thibault
to avoid future incompatibilities when changing the implementation. * include/pthread/pthread.h [!_LIBC] (pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Do not provide inline definition.
2016-10-24Do not pthread_self when raise is called before libpthread initSamuel Thibault
* Versions (__pthread_threads): Add in GLIBC_PRIVATE. * pthreadP.h (__pthread_threads): Declare. * sysdeps/generic/raise.c (__pthread_threads): Make symbol weak. (raise): Check for __pthread_threads before calling __pthread_self.
2016-10-18Fix unregistering atfork handlers on library unloadSamuel Thibault
* sysdeps/generic/old_pt-atfork.c: New file. * Makefile (libpthread-routines): Add old_pt-atfork. (libpthread-static-only-routines): Add pt-atfork. [build-shared=yes] (install): Explicit $(inst_libdir)/libpthread.so [build-shared=yes] $(inst_libdir)/libpthread.so: Replace with script to link libpthread_nonshared.a in. [build-shared=yes] (tests): Link libpthread_nonshared.a in addition to libpthread.so. (generated): Add libpthread_nonshared.a.
2016-10-18Fix spurious common variable definitionsSamuel Thibault
* pthread/pt-internal.h (__pthread_default_rwlockattr, __pthread_default_condattr): Add missing extern qualifier to variable declaration.
2016-10-17Fix too weak references when linking libpthread staticallySamuel Thibault
* sysdeps/pthread/libc-lockP.h [IS_IN (libpthread)]: Do not make __pthread symbols weak.
2016-10-14Fix exec crash due to ext2fsSamuel Thibault
This reverts part of a87bf9a8 for now. This fixes a crash in exec due to ext2fs, still to be investigated. * pthread/pt-exit.c (__pthread_exit): Use pthread_setcancelstate instead of __pthread_setcancelstate.
2016-10-10Fix warningSamuel Thibault
* sysdeps/generic/pt-atfork.c: Include <fork.h>
2016-10-09Merge branch 'master' into master-glibc-2.23Samuel Thibault
2016-10-09Add unregistering atfork handlers on dlcloseSamuel Thibault
* sysdeps/generic/fork.h: New file. * forward.c: Include <fork.h>. (__unregister_atfork): New function.
2016-10-09Fix coding styleSamuel Thibault
2016-10-02Add timer routinesSamuel Thibault
* sysdeps/pthread/Makefile (librt-sysdep_routines) [subdir = rt]: Add timer_routines.
2016-09-21Merge branch 'master' into master-glibc-2.23Samuel Thibault
2016-09-20Fix warningSamuel Thibault
* sysdeps/mach/pt-thread-terminate.c (__pthread_thread_terminate): Cast stack address to vm_address_t before calling __thread_terminate_release.
2016-09-20Fix old-style function definitionSamuel Thibault
* libc_pthread_init.c (__libc_pthread_init): Fix old-style function definition.
2016-09-20Fix old-style function definitionsSamuel Thibault
* sysdeps/pthread/flockfile.c (__flockfile): Fix old-style function definition. * sysdeps/pthread/ftrylockfile.c (__ftrylockfile): Likewise. * sysdeps/pthread/funlockfile.c (__funlockfile): Likewise.
2016-09-19Fix exposition of pthread functionsSamuel Thibault
* pthread/pt-alloc.c (__pthread_alloc): Use __pthread_rwlock_wrlock and __pthread_rwlock_unlock instead of pthread_rwlock_wrlock and pthread_rwlock_unlock. * pthread/pt-create.c (__pthread_create_internal): Use__pthread_rwlock_rdlock and __pthread_rwlock_unlock instead of pthread_rwlock_rdlock and pthread_rwlock_unlock. * pthread/pt-dealloc.c (__pthread_dealloc): Use __pthread_cond_broadcast, __pthread_mutex_lock, and __pthread_mutex_unlock instead of pthread_cond_broadcast, pthread_mutex_lock, and pthread_mutex_unlock * pthread/pt-exit.c (__pthread_exit): Use __pthread_setcancelstate and __pthread_cond_broadcast instead of pthread_setcancelstate and pthread_cond_broadcast. * pthread/pt-internal.h (__pthread_getid, __pthread_setid): Use __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and __pthread_rwlock_unlock instead of pthread_rwlock_rdlock, pthread_rwlock_wrlock, and pthread_rwlock_unlock * pthread/pt-join.c (pthread_join): Use __pthread_cond_wait instead of pthread_cond_wait. * sysdeps/hurd/pt-key-delete.c (pthread_key_delete): Use __pthread_rwlock_rdlock and __pthread_rwlock_unlock instead of pthread_rwlock_rdlock and pthread_rwlock_unlock.
2016-09-19Make PTHREAD_ONCE_INIT a symbolic valueSamuel Thibault
as required by Posix * sysdeps/pthread/bits/once.h (__PTHREAD_ONCE_INIT): Cast initializer to (struct __pthread_once).
2016-09-19Fix hiding functionsSamuel Thibault
* Makefile (CPPFLAGS): Add -imacros $(srcdir)/not-in-libc.h only when IN_GLIBC is no.
2016-09-19Fix getrlimit visibilitySamuel Thibault
* pthread/pt-create.c (__pthread_create_internal): Call __getrlimit instead of getrlimit.
2016-09-19Fix pthread_kill and pthread_self visibility from raiseSamuel Thibault
* pthreadP.h: New file. * sysdeps/generic/pt-kill.c (pthread_kill): Rename to __pthread_kill. pthread_kill: New strong alias. * sysdeps/hurd/pt-kill.c: Likewise. * sysdeps/generic/raise.c: Include <pthreadP.h> instead of <pthread.h>. Make __pthread_kill and __pthread_self weak. (raise): Use __pthread_kill and __pthread_self instead of pthread_kill and pthread_self.
2016-09-12Expose __register_atfork publiclySamuel Thibault
Some applications make use of it, and get spurious strong dependencies when the symbol is versioned as private. * Version (__register_atfork): Move from GLIBC_PRIVATE to GLIBC_2.22.
2016-09-12Merge branch 'master-glibc-2.22' into master-glibc-2.23Samuel Thibault
2016-09-12Merge branch 'master-glibc-2.21' into master-glibc-2.22Samuel Thibault
2016-09-12Merge branch 'master' into master-glibc-2.21Samuel Thibault
2016-09-11Add dso_handle parameter to __register_atforkSamuel Thibault
* forward.c (struct atfork): Add dso_handle field. (__register_atfork): Add dso_handle parameter. Store it it dso_handle field. * sysdeps/generic/pt-atfork.c (__dso_handle): New variable. (pthread_atfork): Pass address of __dso_handle to __register_atfork.
2016-08-23Merge branch 'master-glibc-2.22' into master-glibc-2.23Samuel Thibault
2016-08-23Merge branch 'master-glibc-2.21' into master-glibc-2.22Samuel Thibault
2016-08-23Missing NOT_IN_ -> IS_IN conversionSamuel Thibault
* sysdeps/pthread/bits/libc-lockP.h: Use IS_IN (libc) instead of !defined NOT_IN_libc.
2016-08-21Merge branch 'master-glibc-2.22' into master-glibc-2.23Samuel Thibault
2016-08-21Revert "Add missing pthread_setcancelstate alias"Samuel Thibault
This reverts commit 80d014410ffdd3ce86ff7dcc7d8ca695f6fbb2ed.
2016-08-21Merge branch 'master-glibc-2.22' into master-glibc-2.23Samuel Thibault