summary refs log tree commit diff
path: root/sysdeps/mach/alpha
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-02-26 00:01:15 +0000
committerRoland McGrath <roland@gnu.org>2003-02-26 00:01:15 +0000
commit4e5b051fad8e6707736d3ddc4819ab797d23cd91 (patch)
tree62562086317b2efeee225689d548ef0990381cf3 /sysdeps/mach/alpha
parent1d02f71fe4046c1cd17ff6b6687a89932797cb3b (diff)
downloadglibc-4e5b051fad8e6707736d3ddc4819ab797d23cd91.tar.gz
glibc-4e5b051fad8e6707736d3ddc4819ab797d23cd91.tar.xz
glibc-4e5b051fad8e6707736d3ddc4819ab797d23cd91.zip
Revert unintentional commits.
Diffstat (limited to 'sysdeps/mach/alpha')
-rw-r--r--sysdeps/mach/alpha/machine-lock.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 363c29e56f..80f8750c87 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -1,5 +1,5 @@
 /* Machine-specific definition for spin locks.  Alpha version.
-   Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,8 +38,8 @@ typedef __volatile long int __spin_lock_t;
 _EXTERN_INLINE void
 __spin_unlock (__spin_lock_t *__lock)
 {
-  __asm__ __volatile__ ("mb");
-  *__lock = 0;
+  __asm__ __volatile__ ("mb; stq $31, %0; mb"
+			: "=m" (__lock));
 }
 
 /* Try to lock LOCK; return nonzero if we locked it, zero if another has.  */
@@ -47,9 +47,6 @@ __spin_unlock (__spin_lock_t *__lock)
 _EXTERN_INLINE int
 __spin_try_lock (register __spin_lock_t *__lock)
 {
-#if 1
-  return 1;
-#else
   register long int __rtn, __tmp;
 
   do
@@ -69,7 +66,6 @@ __spin_try_lock (register __spin_lock_t *__lock)
    } while (! __rtn);
   /* RTN is now nonzero; we have the lock.  */
   return __rtn;
-#endif
 }
 
 /* Return nonzero if LOCK is locked.  */