aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/alpha')
-rw-r--r--sysdeps/mach/alpha/machine-lock.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 80f8750c87..363c29e56f 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, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994,97,2002 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; stq $31, %0; mb"
- : "=m" (__lock));
+ __asm__ __volatile__ ("mb");
+ *__lock = 0;
}
/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */
@@ -47,6 +47,9 @@ __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
@@ -66,6 +69,7 @@ __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. */