Age | Commit message (Collapse) | Author |
|
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.
|
|
2005-05-12 Neal H. Walfield <neal@gnu.org>
* include/pthread/pthread.h (pthread_exit): Add noreturn
attribute.
* sysdeps/generic/bits/condition.h (__PTHREAD_COND_INITIALIZER):
Don't create a compound literal.
* sysdeps/generic/bits/mutex.h (__PTHREAD_MUTEX_INITIALIZER):
Don't create a compound literal.
(pthread_mutex_init): Don't assign to *__MUTEX directly.
Initialize an intermediate local variable and then copy the
result.
* sysdeps/generic/bits/rwlock.h (__PTHREAD_RWLOCK_INITIALIZER):
Don't create a compound literal.
(pthread_rwlock_init): Don't assign to *__RWLOCK directly.
Initialize an intermediate local variable and then copy the
result.
* sysdeps/i386/bits/spin-lock.h (__SPIN_LOCK_INITIALIZER):
Don't create a compound literal.
* pthread/pt-alloc.c (initialize_pthread): Cast
PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER to create a
compound literal.
* tests/test-1.c (main): Use pthread_mutex_init, not
PTHREAD_MUTEX_INIT for mutex initialization
* sysdeps/generic/pt-barrier-init.c (pthread_barrier_init): Remove
assert. Copy ATTR if non-defaults are used.
* sysdeps/generic/pt-cond-init.c (pthread_cond_init): Include
<string.h>. Remove assert. Copy ATTR if non-defaults are used.
* sysdeps/generic/pt-mutex-init.c (_pthread_mutex_init): Cast
PTHREAD_MUTEX_INITIALIZER to create a compound literal.
* sysdeps/generic/pt-rwlock-init.c: Include <string.h>.
(_pthread_rwlock_init): Cast __PTHREAD_RWLOCK_INITIALIZER to
create a compound literal. Copy ATTR if non-defaults are used.
* sysdeps/generic/pt-cond-timedwait.c
(__pthread_cond_timedwait_internal): Check that ABSTIME->TV_NSEC
is valid. Don't shadow ERR. Don't return before cleaning up.
* sysdeps/generic/pt-mutex-timedlock.c (pthread_mutex_timedlock):
Move after __pthread_mutex_timedlock_internal. Check that
ABSTIME->TV_NSEC is valid.
* sysdeps/generic/pt-rwlock-timedrdlock.c
(pthread_rwlock_timedrdlock): Move after.
__pthread_rwlock_timedrdlock_internal.
(__pthread_rwlock_timedrdlock_internal): Check that
ABSTIME->TV_NSEC is valid.
* sysdeps/generic/pt-rwlock-timedwrlock.c
(pthread_rwlock_timedwrlock): Move after
__pthread_rwlock_timedwrlock_internal.
(__pthread_rwlock_timedwrlock_internal): Check that
ABSTIME->TV_NSEC is valid.
* sysdeps/generic/sem-timedwait.c (__sem_timedwait_internal):
Check that TIMEOUT->TV_NSEC is valid before enqueuing the thread.
* sysdeps/generic/pt-rwlock-rdlock.c
(__pthread_rwlock_timedrdlock_internal): Fix declaration.
* sysdeps/generic/pt-mutex-trylock.c (__pthread_mutex_trylock):
Don't return EDEADLK. POSIX does not allow it.
* sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Calculate
the relative timeout without overflowing.
* sysdeps/mach/hurd/i386/pt-setup.c (stack_setup): Cast THREAD.
|
|
2005-05-12 Neal H. Walfield <neal@gnu.org>
* Makefile (SRCS): Add sem-close.c sem-destroy.c sem-getvalue.c
sem-init.c sem-open.c sem-post.c sem-timedwait.c sem-trywait.c
sem-unlink.c and sem-wait.c.
(sysdeps_headers): Add semaphore.h bits/semaphore.h.
* include/semaphore.h: New file.
* sysdeps/generic/sem-close.c: New file.
* sysdeps/generic/sem-destroy.c: New file.
* sysdeps/generic/sem-getvalue.c: New file.
* sysdeps/generic/sem-init.c: New file.
* sysdeps/generic/sem-open.c: New file.
* sysdeps/generic/sem-post.c: New file.
* sysdeps/generic/sem-timedwait.c: New file.
* sysdeps/generic/sem-trywait.c: New file.
* sysdeps/generic/sem-unlink.c: New file.
* sysdeps/generic/sem-wait.c: New file.
* sysdeps/generic/bits/semaphore.h: New file.
|
|
2005-05-02 Neal H. Walfield <neal@gnu.org>
* pthread/pt-alloc.c (__pthread_alloc): Set the thread id to the
table index plus one.
* pthread/pt-internal.h (__pthread_getid): Index __pthread_threads
using THREAD - 1, not THREAD.
(__pthread_setid): Likewise.
* pthread/pt-create.c (__pthread_create_internal): Likewise.
* sysdeps/generic/pt-mutex-trylock.c (__pthread_mutex_trylock):
When returning EBUSY, don't forget to first unlock MUTEX->__HELD.
|
|
2005-04-20 Neal H. Walfield <neal@gnu.org>
* sysdeps/generic/pt-setschedparam.c: policy's type is int, not
int *.
* include/pthread/pthread.h: Likewise.
Reported by Christopher `Physicman' Bodenstein <cb@physicman.net>.
|
|
2005-01-12 Pietro Ferrari <pietro@bastardi.net>
* include/pthread/pthread.h (pthread_spin_destroy): Replace extern
inline with extern __inline.
(pthread_spin_init): Likewise.
(pthread_spin_lock): Likewise.
(pthread_spin_trylock): Likewise.
(pthread_spin_unlock): Likewise.
* sysdeps/mach/bits/spin-lock.h (__pthread_spin_lock): Likewise.
* sysdeps/i386/bits/spin-lock.h (__pthread_spin_lock): Likewise.
* sysdeps/generic/bits/mutex.h (__pthread_mutex_trylock):
Likewise.
(pthread_mutex_lock): Likewise.
(pthread_mutex_trylock): Likewise.
* sysdeps/generic/bits/pthread.h (pthread_equal): Likewise.
|
|
* sysdeps/mach/pt-wakeup.c (__pthread_wakeup): Use the size of
THREAD->wakeupmsg which may not be a mach_msg_header_t.
* sysdeps/generic/pt-mutex-timedlock.c
(__pthread_mutex_timedlock_internal): Really test for equality.
* sysdeps/generic/pt-rwlock-timedrdlock.c
(__pthread_rwlock_timedrdlock_internal): Likewise.
* sysdeps/generic/pt-rwlock-timedwrlock.c
(__pthread_rwlock_timedwrlock_internal): Likewise.
* sysdeps/generic/pt-cond-timedwait.c
(__pthread_cond_timedwait_internal): On timeout, remove our thread
structure from the wait queue if necessary.
* sysdeps/l4/pt-start.c (__pthread_start): Call L4_Myself, not
__mach_thread_self.
* sysdeps/mach/hurd/i386/pt-setup.c: Include <mach.h>.
(__pthread_setup): Do not leak references from __mach_thread_self.
* sysdeps/mach/hurd/pt-docancel.c (__pthread_do_cancel): Likewise.
* sysdeps/mach/hurd/pt-sysdep.h (_pthread_self): Likewise.
* sysdeps/mach/pt-thread-alloc.c (__pthread_thread_alloc): Likewise.
* sysdeps/mach/pt-thread-start.c (__pthread_thread_start): Likewise.
* sysdeps/mach/pt-start.c: Remove dead file.
|
|
* sysdeps/generic/pt-key-delete.c, sysdeps/hurd/pt-key-delete.c
(pthread_key_delete): Renamed from pthread_key_destroy. Reported
by Michael Koch <konqueror@gmx.de>
|
|
|