]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/ia64/dl-fptr.c [_LIBC_REENTRANT]: Include <ia64intrin.h>
authorRoland McGrath <roland@gnu.org>
Tue, 12 Nov 2002 08:31:50 +0000 (08:31 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 12 Nov 2002 08:31:50 +0000 (08:31 +0000)
instead of <pt-machine.h>.
[_LIBC_REENTRANT] (lock, unlock): Use __sync_lock_* macros instead of
testandset.
From Ian Wienand <ianw@gelato.unsw.edu.au>.

ChangeLog
sysdeps/ia64/dl-fptr.c

index 6b54fb1537217605cc0972c42b381117e812c832..20515ef0b86ac8244139430de50e1acd77146400 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-11-12  Roland McGrath  <roland@redhat.com>
+
+       * 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>.
+
 2002-11-10  Roland McGrath  <roland@redhat.com>
 
        * libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
index 809e11311f65ffc7dedf931d9da89b44e42b0437..929d1959d282c7141e2da51350ac7bedae1dfc8c 100644 (file)
@@ -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)