projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15d4cc8
)
Add a SYNC instruction to the S_UNLOCK sequence for MIPS.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Sun, 28 Aug 2005 18:26:07 +0000
(18:26 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Sun, 28 Aug 2005 18:26:07 +0000
(18:26 +0000)
src/include/storage/s_lock.h
patch
|
blob
|
blame
|
history
diff --git
a/src/include/storage/s_lock.h
b/src/include/storage/s_lock.h
index 4acd652a3ff6bea53b515bb04fd54fec59a86bea..29e071440bea6d6f853ae9c18b2ca4d8d4a7a262 100644
(file)
--- a/
src/include/storage/s_lock.h
+++ b/
src/include/storage/s_lock.h
@@
-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 */