From 4f10bb74f7ace5391321460b385e95f827bdac00 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 28 Aug 2005 18:26:07 +0000 Subject: [PATCH] Add a SYNC instruction to the S_UNLOCK sequence for MIPS. --- src/include/storage/s_lock.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 4acd652a3f..29e071440b 100644 --- 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 */ -- 2.39.5