aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-31 06:30:37 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-31 06:30:37 +0000
commit5d4f57bd9398d5b4d0ed26af9d4bf6e65c28c73c (patch)
tree1c51ae91f2c8e2bce901abf416453f96a322837d /nptl/sysdeps/unix/sysv/linux/lowlevellock.c
parent7ab7ea333d4d8274ecada374923209efa13bb900 (diff)
downloadglibc-5d4f57bd9398d5b4d0ed26af9d4bf6e65c28c73c.tar
glibc-5d4f57bd9398d5b4d0ed26af9d4bf6e65c28c73c.tar.gz
glibc-5d4f57bd9398d5b4d0ed26af9d4bf6e65c28c73c.tar.bz2
glibc-5d4f57bd9398d5b4d0ed26af9d4bf6e65c28c73c.zip
Update.
2003-05-30 Ulrich Drepper <drepper@redhat.com> * scripts/config.guess: Update from master copy. * scripts/config.sub: Likewise.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/lowlevellock.c')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevellock.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index db10573a45..eb3e689b9e 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -27,13 +27,15 @@
void
__lll_lock_wait (int *futex, int val)
{
+ /* In the loop we are going to add 2 instead of 1 which is what
+ the caller did. Account for that. */
+ --val;
do
{
- lll_futex_wait (futex, val + 1);
- val = atomic_exchange_and_add (futex, 1);
+ lll_futex_wait (futex, val + 2);
+ val = atomic_exchange_and_add (futex, 2);
}
while (val != 0);
- *futex = 2;
}
hidden_proto (__lll_lock_wait)