diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-28 18:26:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-28 18:26:01 +0000 |
commit | 7319ab9a594525085aa55ec87fae30fa9bd8984f (patch) | |
tree | 13f04039cd3e1cdba4fcede75ce4f010b0ded108 | |
parent | 0c172b215a353a4e5e88097cb14c24acaa8d1130 (diff) | |
download | postgresql-7319ab9a594525085aa55ec87fae30fa9bd8984f.tar.gz postgresql-7319ab9a594525085aa55ec87fae30fa9bd8984f.zip |
Add a SYNC instruction to the S_UNLOCK sequence for MIPS.
-rw-r--r-- | src/include/storage/s_lock.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 75b15a334e2..b4e2ab202e5 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.138 2005/08/27 16:22:48 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.139 2005/08/28 18:26:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -487,6 +487,14 @@ tas(volatile slock_t *lock) return _res; } +/* MIPS S_UNLOCK is almost standard but requires a "sync" instruction */ +#define S_UNLOCK(lock) \ +do \ +{\ + __asm__ __volatile__ (" sync \n"); \ + *((volatile slock_t *) (lock)) = 0; \ +} while (0) + #endif /* __mips__ && !__sgi */ |