aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-04-11 18:41:17 +0000
committerAndreas Jaeger <aj@suse.de>2000-04-11 18:41:17 +0000
commit2a086df9ddfdd925cf81b67859bab5d882a3d8fb (patch)
treea7d9db7c0a08f57c8c8059e1494c5d1804436ba5 /linuxthreads
parent25728f039799790439b3aaf7f321727a0abf5192 (diff)
downloadglibc-2a086df9ddfdd925cf81b67859bab5d882a3d8fb.zip
glibc-2a086df9ddfdd925cf81b67859bab5d882a3d8fb.tar.gz
glibc-2a086df9ddfdd925cf81b67859bab5d882a3d8fb.tar.bz2
2000-04-11 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define. (__compare_and_swap): Mark as modifying memory. 2000-04-11 Andreas Jaeger <aj@suse.de> * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define. (__compare_and_swap): Mark as modifying memory.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog5
-rw-r--r--linuxthreads/sysdeps/mips/pt-machine.h10
2 files changed, 12 insertions, 3 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 48a24b1..e81ec47 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-11 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
+ (__compare_and_swap): Mark as modifying memory.
+
2000-04-11 Geoff Keating <geoffk@cygnus.com>
* sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
diff --git a/linuxthreads/sysdeps/mips/pt-machine.h b/linuxthreads/sysdeps/mips/pt-machine.h
index 5273923..50765b1 100644
--- a/linuxthreads/sysdeps/mips/pt-machine.h
+++ b/linuxthreads/sysdeps/mips/pt-machine.h
@@ -1,8 +1,8 @@
/* Machine-dependent pthreads configuration and inline functions.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
+ Contributed by Ralf Baechle <ralf@gnu.org>.
Based on the Alpha version by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,9 @@
# define PT_EI extern inline
#endif
+/* Memory barrier. */
+#define MEMORY_BARRIER() __asm__ ("" : : : "memory")
+
/* Spinlock implementation; required. */
PT_EI long int
@@ -84,7 +87,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
"2:\t.set\tmips0\n\t"
"/* End compare & swap */"
: "=&r"(ret), "=m"(*p)
- : "r"(oldval), "r"(newval), "m"(*p));
+ : "r"(oldval), "r"(newval), "m"(*p)
+ : "memory");
return ret;
}