Age | Commit message (Collapse) | Author |
|
To make `__pthread_timedblock' properly measure time using the right
clock, add a new argument representing the clock to use.
* pthread/pt-internal.h (__pthread_timedblock): New argument CLOCK_ID.
* sysdeps/l4/pt-timedblock.c (__pthread_timedblock): Likewise.
* sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Likewise.
* sysdeps/generic/pt-cond-timedwait.c
(__pthread_cond_timedwait_internal): Pass the clock of the
`pthread_cond' to `__pthread_timedblock'.
* sysdeps/generic/pt-mutex-timedlock.c
(__pthread_mutex_timedlock_internal): Pass CLOCK_REALTIME to
`__pthread_timedblock'.
* sysdeps/generic/pt-rwlock-timedrdlock.c
(__pthread_rwlock_timedrdlock_internal): Likewise.
* sysdeps/generic/pt-rwlock-timedwrlock.c
(__pthread_rwlock_timedwrlock_internal): Likewise.
* sysdeps/generic/sem-timedwait.c (__sem_timedwait_internal):
Likewise.
|
|
Libc will need to be able to call them, so they need to have a different
name.
* pthread/pt-exit.c (pthread_exit): Rename with __ prefix and add strong alias.
* pthread/pt-self.c (pthread_self): Likewise.
* pthread/pt-setcancelstate.c (pthread_setcancelstate): Likewise
* pthread/pt-setcanceltype.c (pthread_setcanceltype): Likewise
* sysdeps/generic/pt-attr-destroy.c (pthread_attr_destroy): Likewise
* sysdeps/generic/pt-attr-getdetachstate.c (pthread_attr_getdetachstate): Likewise
* sysdeps/generic/pt-attr-getinheritsched.c (pthread_attr_getinheritsched): Likewise
* sysdeps/generic/pt-attr-getschedparam.c (pthread_attr_getschedparam): Likewise
* sysdeps/generic/pt-attr-getschedpolicy.c (pthread_attr_getschedpolicy): Likewise
* sysdeps/generic/pt-attr-getscope.c (pthread_attr_getscope): Likewise
* sysdeps/generic/pt-attr-init.c (pthread_attr_init): Likewise
* sysdeps/generic/pt-attr-setdetachstate.c (pthread_attr_setdetachstate): Likewise
* sysdeps/generic/pt-attr-setinheritsched.c (pthread_attr_setinheritsched): Likewise
* sysdeps/generic/pt-attr-setschedparam.c (pthread_attr_setschedparam): Likewise
* sysdeps/generic/pt-attr-setschedpolicy.c (pthread_attr_setschedpolicy): Likewise
* sysdeps/generic/pt-attr-setscope.c (pthread_attr_setscope): Likewise
* sysdeps/generic/pt-cond-brdcast.c (pthread_cond_broadcast): Likewise
* sysdeps/generic/pt-cond-destroy.c (pthread_cond_destroy): Likewise
* sysdeps/generic/pt-cond-init.c (pthread_cond_init): Likewise
* sysdeps/generic/pt-cond-signal.c (pthread_cond_signal): Likewise
* sysdeps/generic/pt-cond-timedwait.c (pthread_cond_timedwait): Likewise
* sysdeps/generic/pt-cond-wait.c (pthread_cond_wait): Likewise
* sysdeps/generic/pt-condattr-destroy.c (pthread_condattr_destroy): Likewise
* sysdeps/generic/pt-condattr-init.c (pthread_condattr_init): Likewise
* sysdeps/generic/pt-equal.c (pthread_equal): Likewise
* sysdeps/generic/pt-getschedparam.c (pthread_getschedparam): Likewise
* sysdeps/generic/pt-setschedparam.c (pthread_setschedparam): 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.
|
|
* 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.
|
|
|