summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-09-21Avoid exposing function prototype parameter namesSamuel Thibault
* include/pthread/pthread.h: Prepend '__' to parameter names. * sysdeps/mach/hurd/bits/pthread-np.h: Likewise.
2015-09-01Move semaphore.h to place where glibc expects it to beSamuel Thibault
* include/semaphore.h: Move to ... * sysdeps/pthread/semaphore.h: ... here.
2015-09-01Harmonize semaphore.h with glibcSamuel Thibault
* include/semaphore.h: Reorder function declarations, prepend parameter names with __. (sem_init, sem_destroy, *sem_open, sem_close, sem_unlink, sem_getvalue): Add __THROW attribute. (sem_trywait, sem_post): Add __THROWNL attribute.
2015-09-01Fix inclusion of semaphore.h before sys/types.hSamuel Thibault
* include/semaphore.h: Include <sys/types.h> [__USE_XOPEN2K]: Define __need_timespec and include <time.h>
2015-09-01Fix syntaxSamuel Thibault
* Versions (libc): Add missing closing brace.
2015-09-01Fix spurious dependency of libc on libpthreadSamuel Thibault
* sysdeps/generic/raise.c (pthread_self): Make reference weak.
2015-09-01Fix raise thread-aware implementationSamuel Thibault
* sysdeps/generic/raise.c (pthread_kill): Make ref weak. (raise): Only call pthread_kill when it is not NULL. Call kill otherwise.
2015-09-01Drop debugging statementsSamuel Thibault
* sysdeps/generic/raise.c (raise): Do not call debug.
2015-09-01Fix raise.c buildSamuel Thibault
* sysdeps/generic/raise.c: Include <pthread.h> instead of non-existing "sig-internal.h"
2015-09-01Remove more unused signals implementationSamuel Thibault
* sysdeps/generic/killpg.c: Remove file. * sysdeps/generic/sigaddset.c: Likewise. * sysdeps/generic/sigdelset.c: Likewise. * sysdeps/generic/sigemptyset.c: Likewise. * sysdeps/generic/sigfillset.c: Likewise. * sysdeps/generic/siginterrupt.c: Likewise. * sysdeps/generic/sigismember.c: Likewise. * sysdeps/generic/signal.c: Likewise. * sysdeps/generic/sigwait.c: Likewise.
2015-09-01Harmonize semaphore.h with glibcSamuel Thibault
* include/semaphore.h: Reorder function declarations, prepend parameter names with __. (sem_init, sem_destroy, *sem_open, sem_close, sem_unlink, sem_getvalue): Add __THROW attribute. (sem_trywait, sem_post): Add __THROWNL attribute.
2015-09-01Fix inclusion of semaphore.h before sys/types.hSamuel Thibault
* include/semaphore.h: Include <sys/types.h> [__USE_XOPEN2K]: Define __need_timespec and include <time.h>
2015-08-30Fix syntaxSamuel Thibault
* Versions (libc): Add missing closing brace.
2015-08-28Fix spurious dependency of libc on libpthreadSamuel Thibault
* sysdeps/generic/raise.c (pthread_self): Make reference weak.
2015-08-20Fix raise thread-aware implementationSamuel Thibault
* sysdeps/generic/raise.c (pthread_kill): Make ref weak. (raise): Only call pthread_kill when it is not NULL. Call kill otherwise.
2015-08-20Drop debugging statementsSamuel Thibault
* sysdeps/generic/raise.c (raise): Do not call debug.
2015-08-20Fix raise.c buildSamuel Thibault
* sysdeps/generic/raise.c: Include <pthread.h> instead of non-existing "sig-internal.h"
2015-08-20Remove more unused signals implementationSamuel Thibault
* sysdeps/generic/killpg.c: Remove file. * sysdeps/generic/sigaddset.c: Likewise. * sysdeps/generic/sigdelset.c: Likewise. * sysdeps/generic/sigemptyset.c: Likewise. * sysdeps/generic/sigfillset.c: Likewise. * sysdeps/generic/siginterrupt.c: Likewise. * sysdeps/generic/sigismember.c: Likewise. * sysdeps/generic/signal.c: Likewise. * sysdeps/generic/sigwait.c: Likewise.
2015-05-14Merge branch 'master' into master-glibcglibc-2.19-hurd+libpthread-20150515Samuel Thibault
2015-05-14Merge branch 'master' into master-glibc-2.21Samuel Thibault
2015-05-14Use glibc Makerules to install a relative library symlinkDavid Michael
* Makefile (install-lib): New variable. (install-lib-ldscripts): Remove variable. [IN_GLIBC] ($(inst_libdir)/libpthread.so): Remove rule.
2015-05-14Use glibc Makerules to install a relative library symlinkDavid Michael
* Makefile (install-lib): New variable. (install-lib-ldscripts): Remove variable. [IN_GLIBC] ($(inst_libdir)/libpthread.so): Remove rule.
2015-05-06Shuffle files for building with glibcSamuel Thibault
* configure: New file * include/libc-symbols.h: Remove file * include/set-hooks: Remove file * sysdeps/i386/bits/spin-lock-inline.h: Move to... * b/sysdeps/mach/i386/bits/spin-lock-inline.h: ... here. * sysdeps/i386/bits/spin-lock.h: Move to... * b/sysdeps/mach/i386/bits/spin-lock.h: ... here.
2015-05-06Wake up the message thread when pending signals have been unblockedSamuel Thibault
(code grabbed from glibc) * libpthread/sysdeps/mach/hurd/pt-sigstate.c: Include <hurd/msg.h> (__pthread_sigstate): Use _hurd_sigstate_lock/unlock instead of __pthread_spin_lock on `ss->lock'. Check _hurd_sigstate_pending and send a message to the signal thread if needed.
2015-05-07Revert "Fix build with glibc < 2.21"glibc-2.21-hurd3Samuel Thibault
This reverts commit 9aa597d0457d265b9bbdc213de67a8ce9e30f60a.
2015-05-07Merge branch 'master' into master-glibc-2.21Samuel Thibault
2015-05-07Fix build with glibc < 2.21Samuel Thibault
* pthread/pt-internal.h: Use IS_IN_libpthread instead of IS_IN (libpthread).
2015-05-06Revert "Revert "Fix librt link""glibc-2.21-hurd2Samuel Thibault
This reverts commit 5f7caa161f5e190c058166dc0ddccae64a258f28.
2015-05-06Merge branch 'master' into master-glibc-2.21Samuel Thibault
2015-05-06Revert "Fix librt link"Samuel Thibault
This reverts commit 8b48173fdc8f52a234ff9d3d1de5277c60d7eea4.
2015-05-06Revert "Revert "Stop using IS_IN""glibc-2.21-hurd1Samuel Thibault
This reverts commit c6fc9fbb8e0d2e0a8147197c31589cdc96497e07.
2015-05-06Revert "Stop using IS_IN"Samuel Thibault
This reverts commit 44ae774bed1a75ea926590f1bc7c9f3328219832.
2015-03-23Fix safety of pthread_onceSamuel Thibault
* sysdeps/generic/pt-once.c (__pthread_once): Call __memory_barrier before testing the __run field.
2015-03-22Move headers from generic/ to pthread/Samuel Thibault
So that the glibc makerules can find them instead of using the system ones. * sysdeps/generic/bits/barrier-attr.h: Move to... * sysdeps/pthread/bits/barrier-attr.: ... here. * sysdeps/generic/bits/barrier.h: Move to... * sysdeps/pthread/bits/barrier.: ... here. * sysdeps/generic/bits/cancelation.h: Move to... * sysdeps/pthread/bits/cancelation.: ... here. * sysdeps/generic/bits/condition-attr.h: Move to... * sysdeps/pthread/bits/condition-attr.: ... here. * sysdeps/generic/bits/condition.h: Move to... * sysdeps/pthread/bits/condition.: ... here. * sysdeps/generic/bits/mutex-attr.h: Move to... * sysdeps/pthread/bits/mutex-attr.: ... here. * sysdeps/generic/bits/mutex.h: Move to... * sysdeps/pthread/bits/mutex.: ... here. * sysdeps/generic/bits/once.h: Move to... * sysdeps/pthread/bits/once.: ... here. * sysdeps/generic/bits/pthread-np.h: Move to... * sysdeps/pthread/bits/pthread-np.: ... here. * sysdeps/generic/bits/pthread.h: Move to... * sysdeps/pthread/bits/pthread.: ... here. * sysdeps/generic/bits/pthreadtypes.h: Move to... * sysdeps/pthread/bits/pthreadtypes.: ... here. * sysdeps/generic/bits/rwlock-attr.h: Move to... * sysdeps/pthread/bits/rwlock-attr.: ... here. * sysdeps/generic/bits/rwlock.h: Move to... * sysdeps/pthread/bits/rwlock.: ... here. * sysdeps/generic/bits/semaphore.h: Move to... * sysdeps/pthread/bits/semaphore.: ... here. * sysdeps/generic/bits/thread-attr.h: Move to... * sysdeps/pthread/bits/thread-attr.: ... here. * sysdeps/generic/bits/thread-specific.h: Move to... * sysdeps/pthread/bits/thread-specific.: ... here.
2015-03-22Avoid exposing internals of structuresSamuel Thibault
* sysdeps/generic/bits/barrier-attr.h (__pthread_barrierattr): Rename `pshared' field to `__pshared'. * sysdeps/generic/bits/barrier.h (__pthread_barrier): Rename `lock', `'queue', `pending', `count', `attr', and `data' fields to `__lock', `__queue', `__pending', `__count', `__attr', and `__data'. * sysdeps/generic/bits/cancelation.h (__pthread_cancelation_handler): Rename `handler', `arg', and `next' fields to `__handler', `__arg', and `__next'. * sysdeps/generic/bits/condition-attr.h (__pthread_condattr): Rename `pshared' and `clock' fields to `__pshared', and `__clock'. * sysdeps/generic/bits/mutex-attr.h (__pthread_mutexattr): Rename `prioceiling', `protocol', `pshared', and `mutex_type' fields to `__prioceiling', `__protocol', `__pshared', and `__mutex_type'. * sysdeps/generic/bits/mutex.h (__pthread_mutex): Rename `cthreadscompat1', `attr', `data', `owner', and `locks' fields to `__cthreadscompat1', `__attr', `__data', `__owner', and `__locks'. * sysdeps/generic/bits/once.h (__pthread_once): Rename `run' and `lock' fields to `__run' and `__lock'. * sysdeps/generic/bits/rwlock-attr.h (__pthread_rwlockattr): Rename `psharead' field to `__pshared'. * sysdeps/generic/bits/rwlock.h (__pthread_rwlock): Rename `readers', `readerqueue', and `writerqueue' fields to `__readers', `__readerqueue', and `__writerqueue'. * sysdeps/generic/bits/thread-attr.h (__pthread_contentionscope): Rename `schedparam', `stackaddr', `stacksize', `guardsize', `detachstate', `inheritsched', `contentionscope', and `schedpolicy' fields to `__schedparam', `__stackaddr', `__stacksize', `__guardsize', `__detachstate', `__inheritsched', `__contentionscope', and `__schedpolicy''. * sysdeps/generic/bits/cancelation.h: Update code accordingly. * pthread/pt-create.c: Likewise. * pthread/pt-exit.c: Likewise. * pthread/pt-getattr.c: Likewise. * sysdeps/generic/pt-attr-getdetachstate.c: Likewise. * sysdeps/generic/pt-attr-getguardsize.c: Likewise. * sysdeps/generic/pt-attr-getinheritsched.c: Likewise. * sysdeps/generic/pt-attr-getschedparam.c: Likewise. * sysdeps/generic/pt-attr-getschedpolicy.c: Likewise. * sysdeps/generic/pt-attr-getscope.c: Likewise. * sysdeps/generic/pt-attr-getstackaddr.c: Likewise. * sysdeps/generic/pt-attr-getstacksize.c: Likewise. * sysdeps/generic/pt-attr-setdetachstate.c: Likewise. * sysdeps/generic/pt-attr-setguardsize.c: Likewise. * sysdeps/generic/pt-attr-setinheritsched.c: Likewise. * sysdeps/generic/pt-attr-setschedparam.c: Likewise. * sysdeps/generic/pt-attr-setschedpolicy.c: Likewise. * sysdeps/generic/pt-attr-setscope.c: Likewise. * sysdeps/generic/pt-attr-setstackaddr.c: Likewise. * sysdeps/generic/pt-attr-setstacksize.c: Likewise. * sysdeps/generic/pt-attr.c: Likewise. * sysdeps/generic/pt-barrier-init.c: Likewise. * sysdeps/generic/pt-barrier-wait.c: Likewise. * sysdeps/generic/pt-barrier.c: Likewise. * sysdeps/generic/pt-barrierattr-getpshared.c: Likewise. * sysdeps/generic/pt-barrierattr-setpshared.c: Likewise. * sysdeps/generic/pt-cond-timedwait.c: Likewise. * sysdeps/generic/pt-cond.c: Likewise. * sysdeps/generic/pt-condattr-getclock.c: Likewise. * sysdeps/generic/pt-condattr-getpshared.c: Likewise. * sysdeps/generic/pt-condattr-setclock.c: Likewise. * sysdeps/generic/pt-condattr-setpshared.c: Likewise. * sysdeps/generic/pt-mutex-destroy.c: Likewise. * sysdeps/generic/pt-mutex-init.c: Likewise. * sysdeps/generic/pt-mutex-timedlock.c: Likewise. * sysdeps/generic/pt-mutex-transfer-np.c: Likewise. * sysdeps/generic/pt-mutex-trylock.c: Likewise. * sysdeps/generic/pt-mutex-unlock.c: Likewise. * sysdeps/generic/pt-mutexattr-getprotocol.c: Likewise. * sysdeps/generic/pt-mutexattr-getpshared.c: Likewise. * sysdeps/generic/pt-mutexattr-gettype.c: Likewise. * sysdeps/generic/pt-mutexattr-setprotocol.c: Likewise. * sysdeps/generic/pt-mutexattr-setpshared.c: Likewise. * sysdeps/generic/pt-mutexattr-settype.c: Likewise. * sysdeps/generic/pt-mutexattr.c: Likewise. * sysdeps/generic/pt-once.c: Likewise. * sysdeps/generic/pt-rwlock-attr.c: Likewise. * sysdeps/generic/pt-rwlock-timedrdlock.c: Likewise. * sysdeps/generic/pt-rwlock-timedwrlock.c: Likewise. * sysdeps/generic/pt-rwlock-tryrdlock.c: Likewise. * sysdeps/generic/pt-rwlock-trywrlock.c: Likewise. * sysdeps/generic/pt-rwlock-unlock.c: Likewise. * sysdeps/generic/pt-rwlockattr-getpshared.c: Likewise. * sysdeps/generic/pt-rwlockattr-setpshared.c: Likewise. * sysdeps/mach/hurd/pt-attr-setstackaddr.c: Likewise. * sysdeps/mach/hurd/pt-attr-setstacksize.c: Likewise. * sysdeps/mach/hurd/pt-hurd-cond-timedwait.c: Likewise.
2015-03-22Fix compilation in posix 1995 modeSamuel Thibault
* sysdeps/generic/bits/thread-attr.h: Define __need_size_t macro, include <stddef.h>.
2015-03-22Fix build after 32b1b38Samuel Thibault
* sysdeps/pthread/pthread-functions.h (pthread_functions): Rename ptr_pthread_exit field to ptr___pthread_exit. * pthread/pt-initialize.c (pthread_functions): Likewise.
2015-03-21Silence warningSamuel Thibault
* sysdeps/mach/hurd/pt-hurd-cond-timedwait.c (err): Initialize to 0.
2015-03-21Fix warningSamuel Thibault
* forward.c (pthread_exit): Rename to __pthread_exit. (pthread_exit): New strong alias for __pthread_exit.
2015-03-20Fix librt linkSamuel Thibault
* Makefile (libpthread-routines): Add shm-directory. * Versions (GLIBC_PRIVATE): Add __shm_directory.
2015-03-20Fix reference to ___pthread_initSamuel Thibault
* sysdeps/mach/hurd/pt-sysdep.c (_init_routine): Call ___pthread_init instead of __pthread_init.
2015-03-20Don't hardcode using __libc_stack_endSamuel Thibault
* sysdeps/mach/hurd/pt-sysdep.c (_init_routine): Use `stack' parameter instead of hardcoding __libc_stack_end.
2015-03-08Fix static linking of programs using pthreadSamuel Thibault
The libc-provided lockfile functions must be overriden by the libpthread ones. * sysdeps/pthread/flockfile.c (_IO_flockfile): Make alias weak. * sysdeps/pthread/ftrylockfile.c (_IO_ftrylockfile): Likewise. * sysdeps/pthread/funlockfile.c (_IO_funlockfile): Likewise.
2015-03-08Move pthread-specific lock definitions and declarations to libpthreadSamuel Thibault
* sysdeps/pthread/bits/libc-lockP.h: New file * pthread/pthread-functions.h: Move to... * sysdeps/pthread/pthread-functions.h: ... here.
2015-03-01Forward lockfile calls from libc to dynamically loaded libpthreadSamuel Thibault
* forward.c: (__libc_pthread_functions_init): Add variable (FORWARD2): Use __libc_pthread_functions_init instead of testing __libc_pthread_functions.ptr_##name value. (FORWARD_NORETURN): Add macro. (pthread_exit): Use FORWARD_NORETURN instead of FORWARD2. * libc_pthread_init.c (__libc_pthread_init): Set __libc_pthread_functions_init to 1. * pthread/pthread-functions.h (__pthread_once, __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, __pthread_rwlock_unlock, __pthread_key_create, __pthread_getspecific, __pthread_setspecific, _cthreads_flockfile, _cthreads_funlockfile, _cthreads_ftrylockfile): Add prototypes. (pthread_functions): Add ptr_pthread_once, ptr_pthread_rwlock_rdlock, ptr_pthread_rwlock_wrlock, ptr_pthread_rwlock_unlock, ptr_pthread_key_create, ptr_pthread_getspecific, ptr_pthread_setspecific, ptr__IO_flockfile, ptr__IO_funlockfile, ptr__IO_ftrylockfile. (__libc_pthread_functions_init): Add variable declaration. (PTHFCT_CALL): Add macro. * pthread/pt-initialize.c (pthread_functions): Initialize ptr_pthread_once, ptr_pthread_rwlock_rdlock, ptr_pthread_rwlock_wrlock, pthread_rwlock_unlock, ptr_ptr_pthread_key_create, pthread_getspecific, ptr_pthread_setspecific, ptr_ptr__IO_flockfile, _IO_funlockfile, ptr__IO_ftrylockfile. * sysdeps/generic/pt-once.c (pthread_once): Rename to __pthread_once (pthread_once): Add strong alias. * sysdeps/generic/pt-rwlock-rdlock.c (pthread_rwlock_rdlock): Rename to __pthread_rwlock_rdlock (pthread_rwlock_rdlock): Add strong alias. * sysdeps/generic/pt-rwlock-wrlock.c (pthread_rwlock_wrlock): Rename to __pthread_rwlock_wrlock (pthread_rwlock_wrlock): Add strong alias. * sysdeps/generic/pt-rwlock-unlock.c (pthread_rwlock_unlock): Rename to __pthread_rwlock_unlock (pthread_rwlock_unlock): Add strong alias. * sysdeps/generic/pt-getspecific.c (pthread_getspecific): Rename to __pthread_getspecific (pthread_getspecific): Add strong alias. * sysdeps/generic/pt-setspecific.c (pthread_setspecific): Rename to __pthread_setspecific (pthread_setspecific): Add strong alias. * sysdeps/pthread/flockfile.c: Add file. * sysdeps/pthread/ftrylockfile.c: Add file. * sysdeps/pthread/funlockfile.c: Add file.
2015-02-28Allow libpthread.so to dynamically loaded from a dlopened librarySamuel Thibault
* pthread/pt-internal.h: Include <ldsodefs.h> (_dl_allocate_tls, _dl_deallocate_tls): Remove declarations. * sysdeps/mach/hurd/pt-sysdep.c (init_routine): Rename into _init_routine, add `stack' parameter, return if __pthread_threads is already initialized, pass stack address to __pthread_create_internal if any. (init_routine): New function, calls init_routine with 0 (dynamic_init_routine): New constructor function, calls init_routine with __libc_stack_end.
2015-02-12Update to recent glibcSamuel Thibault
* Makefile [IN_GLIBC] (CPPFLAGS): Do not add -imacros libc-symbols.h. ($(objpfx)libpthread.so): Replace elfobjdir with elf-objpfx.
2015-02-12Rename __pthread_init into ___pthread_initSamuel Thibault
To avoid clashing with the __pthread_init hook. * pthread/pt-initialize.c (__pthread_init): Rename into ___pthread_init. * pthread/pt-internal.h: Likewise. * sysdeps/mach/hurd/pt-sysdep.c: Likewise.
2015-02-12Stop using IS_INSamuel Thibault
* pthread/pt-create.c: Use IS_IN (libpthread) instead of IS_IN_libpthread * pthread/pt-initialize.c: Likewise. * pthread/pt-internal.h: Likewise.
2015-02-12Add missing macroSamuel Thibault
* not-in-libc.h (__thread_terminate_release): New macro.