summaryrefslogtreecommitdiff
path: root/sysdeps/generic/pt-mutex-destroy.c
AgeCommit message (Collapse)Author
2018-03-28Fix coding styleSamuel Thibault
2018-03-03Fix copyright years and addressesAmos Jeffries
* sysdeps/mach/hurd/bits/mutex.h: reformat copyright blurb intro to match other files * replace Free Software Foundation address using gnu.org URL from upstream glibc copyright blurbs. * apply upstream glibc scripts/update-copyrights * update copyright date syntax per upstream glibc request
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.
2009-08-23Fix pthread_mutex_t static initializersSamuel Thibault
Fix pthread_mutex_t static initializers by not leaving references to __pthread_recursive_mutexattr. * include/pthread/pthread.h.orig (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): New macro. * sysdeps/generic/pt-mutex-destroy.c (_pthread_mutex_destroy): Compare mutex->attr with __PTHREAD_ERRORCHECK_MUTEXATTR and __PTHREAD_RECURSIVE_MUTEXATTR instead of __pthread_recursive_mutexattr. * sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): Likewise. * sysdeps/generic/pt-mutex-timedlock.c (__pthread_mutex_timedlock_internal): Likewise. * sysdeps/generic/pt-mutex-transfer-np.c (__pthread_mutex_transfer_np): Likewise. * sysdeps/generic/pt-mutex-trylock.c (__pthread_mutex_trylock): Likewise. * sysdeps/generic/pt-mutex-unlock.c (__pthread_mutex_unlock): Likewise. * sysdeps/generic/pt-mutexattr.c (__pthread_errorcheck_mutexattr): New const. * sysdeps/generic/bits/mutex-attr.h (__pthread_errorcheck_mutexattr): Declare const. * sysdeps/generic/bits/mutex.h (__PTHREAD_ERRORCHECK_MUTEXATTR, __PTHREAD_ERRORCHECK_MUTEX_INITIALIZER, __PTHREAD_RECURSIVE_MUTEXATTR): New macros. (__PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Use __PTHREAD_RECURSIVE_MUTEXATTR macro instead of &__pthread_recursive_mutexattr.
2009-04-072008-08-12 Neal H. Walfield <neal@gnu.org>Neal H. Walfield
Merge in Samuel Thibault's changes from the main line. * Makefile.am (libpthread_a_SOURCES): Add pt-getattr.c. * headers.m4: Link libpthread/include/pthread/pthreadtypes.h to sysroot/include/pthread/pthreadtypes.h and libpthread/sysdeps/${arch}/bits/spin-lock-inline.h. to sysroot/include/bits/spin-lock-inline.h. * include/pthread/pthread.h: Include <sys/cdefs.h>. (__extern_inline): If not defined, define appropriately. 2008-08-04 Samuel Thibault <samuel.thibault@ens-lyon.org> * include/pthread/pthreadtypes.h (__pthread_inheritsched): Remove comma at end of enumeration. 2008-08-03 Samuel Thibault <samuel.thibault@ens-lyon.org> * Makefile (sysdeps_headers): Add spin-lock-inline.h. (SYSDEP_PATH): Move sysdeps/ia32 right after sysdeps/$(MICROKERNEL)/ia32. * include/pthread/pthread.h: Include <bits/spin-lock-inline.h>. * sysdeps/ia32/bits/spin-lock.h: Move inlines to... * sysdeps/ia32/bits/spin-lock-inline.h: ... new file. 2008-08-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * sysdeps/generic/bits/mutex.h: Do not include <errno.h> and <stddef.h> * sysdeps/ia32/bits/memory.h (__memory_barrier): Add memory clobber. * sysdeps/ia32/bits/spin-lock.h (__pthread_spin_trylock, __pthread_spin_unlock): Add memory clobbers. * sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Fix reservation of stack room for initial frame. 2008-07-18 Samuel Thibault <samuel.thibault@ens-lyon.org> * Makefile (sysdeps_headers): add pthread/pthreadtypes.h 2008-06-27 Samuel Thibault <samuel.thibault@ens-lyon.org> * include/pthread/pthread.h: Do not define __need_clockid_t, include <time.h>, and define clockid_t if __clockid_defined is not defined. Include <pthread/pthreadtypes.h> (pthread_equal): New extern inline. (pthread_cleanup_push, pthread_cleanup_pop): New macros. (__pthread_process_shared, __pthread_inheritsched, __pthread_contentionscope, __pthread_detachstate, __pthread_mutex_protocol, __pthread_mutex_type, pthread_attr_t, pthread_mutex_attr_t, pthread_mutex_t, pthread_condattr_t, pthread_cond_t, pthread_spinlock_t, pthread_rwlockattr_t, pthread_rwlock_t, pthread_barrierattr_t, pthread_barrier_t, pthread_key_t, pthread_once_t): Move enums and typedefs to... * include/pthread/pthreadtypes.h: ... new file. * sysdeps/generic/bits/cancelation.h (pthread_cleanup_push): Rename macro to __pthread_cleanup_push. (pthread_cleanup_pop): Rename macro to __pthread_cleanup_pop. * sysdeps/generic/bits/barrier-attr.h (__pthread_process_shared): Forward-declare enum. * sysdeps/generic/bits/condition-attr.h (__pthread_process_shared): Likewise. * sysdeps/generic/bits/mutex-attr.h (__pthread_mutex_protocol, __pthread_process_shared, __pthread_mutex_type): Likewise. * sysdeps/generic/bits/rwlock-attr.h (__pthread_process_shared): Likewise. * sysdeps/generic/bits/thread-attr.h (__pthread_detachstate, __pthread_inheritsched, __pthread_contentionscope): Likewise. * sysdeps/generic/bits/pthread.h (pthread_t): Rename type to __pthread_t. (pthread_equal): Rename to __pthread_equal. 2008-06-27 Samuel Thibault <samuel.thibault@ens-lyon.org> * sysdeps/generic/bits/thread-barrier.h: Remove unused file. 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org> * include/pthread/pthread.h (pthread_getattr_np): New declaration. * pthread/pt-getattr.c: New file. * Makefile (SRCS): Add pt-getattr.c. 2008-03-16 Samuel Thibault <samuel.thibault@ens-lyon.org> * include/libc-symbols.h (HAVE_ASM_PREVIOUS_DIRECTIVE): Define. 2008-02-29 Samuel Thibault <samuel.thibault@ens-lyon.org> * sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Align stack on 0x10 for MMX operations. 2008-01-01 Samuel Thibault <samuel.thibault@ens-lyon.org> * include/pthread/pthread.h (pthread_spin_destroy, pthread_spin_init, pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock): Use __extern_inline macro instead of extern __inline. * sysdeps/ia32/bits/spin-lock.h (__PT_SPIN_INLINE, __pthread_spin_lock): Likewise * sysdeps/generic/bits/pthread.h (pthread_equal): Declare ; only provide inline when __USE_EXTERN_INLINES is defined. Use __extern_inline macro instead of extern __inline. * sysdeps/ia32/bits/memory.h (__memory_barrier): Add static to inline.
2009-04-072008-06-01 Neal H. Walfield <neal@gnu.org>Neal H. Walfield
* include/pthread/pthread.h (PTHREAD_MUTEX_RECURSIVE_INITIALIZER_NP): New definition. * sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_RECURSIVE_INITIALIZER): New definition. * sysdeps/generic/bits/mutex-attr.h (__pthread_recursive_mutexattr): New definition. * sysdeps/generic/pt-mutexattr.c (__pthread_recursive_mutexattr): New declaration. * sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): If ATTR is &__PTHREAD_RECURSIVE_MUTEXATTR, don't allocate a copy, just save in MUTEX->ATTR. * sysdeps/generic/pt-mutex-destroy.c (_pthread_mutex_destroy): If MUTEX->ATTR is &__PTHREAD_RECURSIVE_MUTEXATTR, don't free it.
2008-07-01Update copyright years.Thomas Schwinge
2007-01-202006-01-20 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
Do not let other libraries (like libX11) override libpthread's pthread_mutex_*, pthread_rwlock_* and sem_* dynamic symbols. * libpthread/sysdeps/generic/pt-mutex-destroy.c (pthread_mutex_destroy): Make the alias strong. * libpthread/sysdeps/generic/pt-mutex-init.c (pthread_mutex_init): Likewise. * libpthread/sysdeps/generic/pt-mutex-lock.c (_pthread_mutex_lock, pthread_mutex_lock): Likewise. * libpthread/sysdeps/generic/pt-mutex-trylock.c (_pthread_mutex_trylock, pthread_mutex_trylock): Likewise. * libpthread/sysdeps/generic/pt-mutex-unlock.c (_pthread_mutex_lock, pthread_mutex_unlock): Likewise. * libpthread/sysdeps/generic/pt-rwlock-destroy.c (pthread_rwlock_destroy): Likewise. * libpthread/sysdeps/generic/pt-rwlock-init.c (pthread_rwlock_init): Likewise. * libpthread/sysdeps/generic/sem-destroy.c (sem_destroy): Likewise. * libpthread/sysdeps/generic/sem-getvalue.c (sem_getvalue): Likewise. * libpthread/sysdeps/generic/sem-init.c (sem_init): Likewise. * libpthread/sysdeps/generic/sem-open.c (sem_open): Likewise. * libpthread/sysdeps/generic/sem-post.c (sem_post): Likewise. * libpthread/sysdeps/generic/sem-timedwait.c (sem_timedwait): Likewise. * libpthread/sysdeps/generic/sem-trywait.c (sem_trywait): Likewise. * libpthread/sysdeps/generic/sem-unlink.c (sem_unlink): Likewise. * libpthread/sysdeps/generic/sem-wait.c (sem_wait): Likewise.
2002-10-10Import libpthread.Neal H. Walfield