6666 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
6767 * Portions Copyright (c) 1994, Regents of the University of California
6868 *
69- * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.137 2005/08/26 22:04:42 tgl Exp $
69+ * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.138 2005/08/27 16: 22:48 tgl Exp $
7070 *
7171 *-------------------------------------------------------------------------
7272 */
455455
456456#if defined(__mips__ )&& !defined(__sgi )
457457/* Note: on SGI we use the OS' mutex ABI, see below */
458+ /* Note: R10000 processors require a separate SYNC */
458459#define HAS_TEST_AND_SET
459460
460461typedef unsignedint slock_t ;
@@ -474,11 +475,12 @@ tas(volatile slock_t *lock)
474475" .set noreorder \n"
475476" .set nomacro \n"
476477" ll %0, %2 \n"
477- " or %1, %0,$1 \n"
478+ " or %1, %0,1 \n"
478479" sc %1, %2 \n"
479- " xori %1,$1 \n"
480+ " xori %1,1 \n"
480481" or %0, %0, %1 \n"
481- "1: .set pop "
482+ " sync \n"
483+ " .set pop "
482484:"=&r" (_res ),"=&r" (_tmp ),"+R" (* _l )
483485:
484486:"memory" );