aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-27 16:22:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-27 16:22:58 +0000
commit5677c28c9147445de1fb942b614814f7064fff7f (patch)
treef4c1be731c2ed7f57c112998176e0eb83992456e /src
parent9a6f3630cf5ab4221beb574bf222da669f5afa6a (diff)
downloadpostgresql-5677c28c9147445de1fb942b614814f7064fff7f.tar.gz
postgresql-5677c28c9147445de1fb942b614814f7064fff7f.zip
Get the MIPS assembler syntax right. Also add a separate sync command;
the reference I consulted yesterday said SC does a SYNC, but apparently this is not true on newer MIPS processors, so be safe.
Diffstat (limited to 'src')
-rw-r--r--src/include/storage/s_lock.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index d7dde21a5e2..39410c211b6 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -66,7 +66,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.133.4.2 2005/08/26 22:04:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.133.4.3 2005/08/27 16:22:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -440,6 +440,7 @@ do \
#if defined(__mips__) && !defined(__sgi)
/* Note: on SGI we use the OS' mutex ABI, see below */
+/* Note: R10000 processors require a separate SYNC */
#define HAS_TEST_AND_SET
typedef unsigned int slock_t;
@@ -459,11 +460,12 @@ tas(volatile slock_t *lock)
" .set noreorder \n"
" .set nomacro \n"
" ll %0, %2 \n"
- " or %1, %0, $1 \n"
+ " or %1, %0, 1 \n"
" sc %1, %2 \n"
- " xori %1, $1 \n"
+ " xori %1, 1 \n"
" or %0, %0, %1 \n"
- "1: .set pop "
+ " sync \n"
+ " .set pop "
: "=&r" (_res), "=&r" (_tmp), "+R" (*_l)
:
: "memory");