aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-20 10:23:47 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-20 10:23:47 +0000
commit7793bf7fd7409efaf9cdc8475404409d87c2c537 (patch)
tree1e2fcc95aa2ac23ce446e1f8d88cc9cde2992003 /nptl/sysdeps/unix/sysv
parentf79466a8e909930237d882da8916bbbb1401edf6 (diff)
downloadglibc-7793bf7fd7409efaf9cdc8475404409d87c2c537.tar
glibc-7793bf7fd7409efaf9cdc8475404409d87c2c537.tar.gz
glibc-7793bf7fd7409efaf9cdc8475404409d87c2c537.tar.bz2
glibc-7793bf7fd7409efaf9cdc8475404409d87c2c537.zip
Replace __lll_add and __lll_test_and_set calls with atomic_exchange_and_add and atomic_exchange call respectively.
Diffstat (limited to 'nptl/sysdeps/unix/sysv')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/lowlevellock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index 49d68da702..a5cf687612 100644
--- a/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -30,7 +30,7 @@ __lll_lock_wait (int *futex, int val)
do
{
lll_futex_wait (futex, val + 1);
- val = __lll_add (futex, 1);
+ val = atomic_exchange_and_add (futex, 1);
}
while (val != 0);
*futex = 2;
@@ -70,7 +70,7 @@ __lll_timedlock_wait (int *futex, int val, const struct timespec *abstime)
if (lll_futex_timed_wait (futex, val + 1, &rt) == -ETIMEDOUT)
return ETIMEDOUT;
}
- while ((val = __lll_add (futex, 1)) != 0);
+ while ((val = atomic_exchange_and_add (futex, 1)) != 0);
*futex = 2;
return 0;
@@ -83,7 +83,7 @@ hidden_proto (__lll_timedlock_wait)
int
lll_unlock_wake_cb (int *futex)
{
- int val = __lll_test_and_set (futex, 0);
+ int val = atomic_exchange (futex, 0);
if (__builtin_expect (val > 1, 0))
lll_futex_wake (futex, 1);