aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-20 10:28:06 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-20 10:28:06 +0000
commit9daba4f4b988977b01427a47908a0ca4ab717984 (patch)
treed1ae2cd13fc64e2b89f65cc9940f9ab0ae81aa30 /nptl
parent53fcb885017b3c01e960c0ad68616dbad61f9192 (diff)
downloadglibc-9daba4f4b988977b01427a47908a0ca4ab717984.zip
glibc-9daba4f4b988977b01427a47908a0ca4ab717984.tar.gz
glibc-9daba4f4b988977b01427a47908a0ca4ab717984.tar.bz2
Replace __lll_add calls with atomic_exchange_and_add calls respectively.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/sem_post.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_post.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_timedwait.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_trywait.c2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_wait.c2
7 files changed, 8 insertions, 8 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
index 2f671fa..c9e6be1 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/pthread_once.c
@@ -80,7 +80,7 @@ __pthread_once (once_control, init_routine)
/* Add one to *once_control. */
- __lll_add (once_control, 1);
+ atomic_exchange_and_add (once_control, 1);
/* Wake up all other threads. */
lll_futex_wake (once_control, INT_MAX);
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/sem_post.c b/nptl/sysdeps/unix/sysv/linux/ia64/sem_post.c
index 9b5049e..0527abe 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/sem_post.c
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/sem_post.c
@@ -32,7 +32,7 @@ __new_sem_post (sem_t *sem)
int *futex = (int *) sem;
int err, nr;
- nr = __lll_add (futex, 1);
+ nr = atomic_exchange_and_add (futex, 1);
err = lll_futex_wake (futex, nr + 1);
if (__builtin_expect (err, 0) < 0)
{
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
index 18029e9..88acb26 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
@@ -88,7 +88,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
/* Add one to *once_control to take the bottom 2 bits from 01 to 10. */
- __lll_add (once_control, 1);
+ atomic_exchange_and_add (once_control, 1);
/* Wake up all other threads. */
lll_futex_wake (once_control, INT_MAX);
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_post.c b/nptl/sysdeps/unix/sysv/linux/sem_post.c
index 77defc8..2da6ecd 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_post.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_post.c
@@ -33,7 +33,7 @@ __new_sem_post (sem_t *sem)
int err, nr;
__asm __volatile (__lll_rel_instr ::: "memory");
- nr = __lll_add (futex, 1);
+ nr = atomic_exchange_and_add (futex, 1);
err = lll_futex_wake (futex, nr);
if (err == 0)
return 0;
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
index e1b32f4..632cce4 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
@@ -36,7 +36,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
if (*futex > 0)
{
- val = __lll_dec_if_positive (futex);
+ val = atomic_decrement_if_positive (futex);
if (val > 0)
return 0;
}
@@ -75,7 +75,7 @@ sem_timedwait (sem_t *sem, const struct timespec *abstime)
if (err != 0 && err != -EWOULDBLOCK)
goto error_return;
- val = __lll_dec_if_positive (futex);
+ val = atomic_decrement_if_positive (futex);
}
while (val <= 0);
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_trywait.c b/nptl/sysdeps/unix/sysv/linux/sem_trywait.c
index a7b60a1..f500361 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_trywait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_trywait.c
@@ -35,7 +35,7 @@ __new_sem_trywait (sem_t *sem)
if (*futex > 0)
{
- val = __lll_dec_if_positive (futex);
+ val = atomic_decrement_if_positive (futex);
if (val > 0)
return 0;
}
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_wait.c b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
index 0e50067..1d39b7c 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_wait.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_wait.c
@@ -38,7 +38,7 @@ __new_sem_wait (sem_t *sem)
{
if (*futex > 0)
{
- val = __lll_dec_if_positive (futex);
+ val = atomic_decrement_if_positive (futex);
if (val > 0)
return 0;
}