From e3265f5bc52f21b7da063813b4d0134a343e9a28 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Apr 2000 07:09:10 +0000 Subject: [PATCH] Update. 2000-04-17 Ulrich Drepper * elf/dl-lookup.c (add_dependency): Correct __builtin_expect use. --- ChangeLog | 4 ++++ elf/dl-lookup.c | 2 +- linuxthreads/ChangeLog | 4 ++++ linuxthreads/condvar.c | 6 ++---- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebd237e..95dd041 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-04-17 Ulrich Drepper + + * elf/dl-lookup.c (add_dependency): Correct __builtin_expect use. + 2000-04-15 Ulrich Drepper * csu/Makefile ($(objpfx)version-info.h): Get OS name from uname and diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 7ac8770..16e00b0 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -102,7 +102,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map) if (list[i] == map) break; - if (__builtin_expect (i, act) == act) + if (__builtin_expect (i == act, 1)) { /* No normal dependency. See whether we already had to add it to the special list of dynamic dependencies. */ diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 893528d..5a0ecb5 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,5 +1,9 @@ 2000-04-16 Ulrich Drepper + * condvar.c (pthread_cond_timedwait_relative): Don't test for owner + if fast mutex is used. Don't initialize `already_canceled' twice. + Correctly test for return value of timedsuspend. + * pthread.c: Correct long-time braino. We never set SA_SIGINFO and therefore don't need the _rt versions of the signal handlers. diff --git a/linuxthreads/condvar.c b/linuxthreads/condvar.c index a06517c..ab107c1 100644 --- a/linuxthreads/condvar.c +++ b/linuxthreads/condvar.c @@ -121,11 +121,9 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, pthread_extricate_if extr; /* Check whether the mutex is locked and owned by this thread. */ - if (mutex->__m_owner != self) + if (mutex->__m_kind != PTHREAD_MUTEX_FAST_NP && mutex->__m_owner != self) return EINVAL; - already_canceled = 0; - /* Set up extrication interface */ extr.pu_object = cond; extr.pu_extricate_func = cond_extricate_func; @@ -149,7 +147,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, pthread_mutex_unlock(mutex); - if (!timedsuspend(self, abstime) == 0) { + if (!timedsuspend(self, abstime)) { int was_on_queue; /* __pthread_lock will queue back any spurious restarts that -- 2.7.4