提交 7319ab9a 编写于 作者: T Tom Lane

Add a SYNC instruction to the S_UNLOCK sequence for MIPS.

上级 0c172b21
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * 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) ...@@ -487,6 +487,14 @@ tas(volatile slock_t *lock)
return _res; 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 */ #endif /* __mips__ && !__sgi */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册