about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-30 16:36:18 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-30 16:36:18 +0000
commit50794a453b2ae734d475f9f76e4c0fa0e529a695 (patch)
treed677117fc7d0dd6413507bd7cd1c73238938ee97
parent4761520e934209d9c28851ba3d51a2be18ea5379 (diff)
downloadglibc-50794a453b2ae734d475f9f76e4c0fa0e529a695.tar.gz
glibc-50794a453b2ae734d475f9f76e4c0fa0e529a695.tar.xz
glibc-50794a453b2ae734d475f9f76e4c0fa0e529a695.zip
Update.
2003-05-30  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h
	(__lll_mutex_cond_lock): Add one to value parameter of
	__lll_lock_wait to reflect reality in the futex syscall.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
	(lll_mutex_cond_lock): Likewise.
-rw-r--r--nptl/ChangeLog8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h5
2 files changed, 12 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index e4c7a55794..44c6ca908e 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,11 @@
+2003-05-30  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+	(__lll_mutex_cond_lock): Add one to value parameter of
+	__lll_lock_wait to reflect reality in the futex syscall.
+	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
+	(lll_mutex_cond_lock): Likewise.
+
 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
index 525869b302..b7f018b9a1 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
@@ -142,7 +142,10 @@ __lll_mutex_cond_lock (int *futex)
   int val = atomic_exchange_and_add (futex, 2);
 
   if (__builtin_expect (val != 0, 0))
-    __lll_lock_wait (futex, val);
+    /* Note, the val + 1 is kind of ugly here.  __lll_lock_wait will add
+       1 again.  But we added 2 to the futex value so this is the right
+       value which will be passed to the kernel.  */
+    __lll_lock_wait (futex, val + 1);
 }
 #define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))