diff options
author | Roland McGrath <roland@gnu.org> | 2002-11-12 08:31:50 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-11-12 08:31:50 +0000 |
commit | 7ceef50ec9075b546eb84654bd0d1f42d0fe26d1 (patch) | |
tree | f7050a7fe3cb90d94e2dbe1d815fd1d858a001b3 /sysdeps/ia64 | |
parent | 1ab9366daadaa3d788dbb153805f3be71dfa3cde (diff) | |
download | glibc-7ceef50ec9075b546eb84654bd0d1f42d0fe26d1.zip glibc-7ceef50ec9075b546eb84654bd0d1f42d0fe26d1.tar.gz glibc-7ceef50ec9075b546eb84654bd0d1f42d0fe26d1.tar.bz2 |
* sysdeps/ia64/dl-fptr.c [_LIBC_REENTRANT]: Include <ia64intrin.h>
instead of <pt-machine.h>.
[_LIBC_REENTRANT] (lock, unlock): Use __sync_lock_* macros instead of
testandset.
From Ian Wienand <ianw@gelato.unsw.edu.au>.
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r-- | sysdeps/ia64/dl-fptr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/ia64/dl-fptr.c b/sysdeps/ia64/dl-fptr.c index 809e113..929d195 100644 --- a/sysdeps/ia64/dl-fptr.c +++ b/sysdeps/ia64/dl-fptr.c @@ -27,7 +27,7 @@ #include <elf/dynamic-link.h> #include <dl-machine.h> #ifdef _LIBC_REENTRANT -# include <pt-machine.h> +# include <ia64intrin.h> # include <signal.h> # include <time.h> #endif @@ -73,7 +73,7 @@ local = if (!__sigismember (&(l)->full_sigset, SIGINT)) \ __sigfillset (&(l)->full_sigset); \ \ - while (testandset ((int *) &(l)->lock)) \ + while (__sync_lock_test_and_set (&(l)->lock, 1)) \ { \ struct timespec ts; \ if (i > 0) \ @@ -88,7 +88,7 @@ local = __sigprocmask (SIG_BLOCK, &(l)->full_sigset, &_saved_set); # define unlock(l) \ __sigprocmask (SIG_SETMASK, &_saved_set, NULL); \ - (l)->lock = 0; \ + __sync_lock_release (&(l)->lock); \ } #else # define lock(l) |