Skip to content

Commit 7319ab9

Browse files
committed
Add a SYNC instruction to the S_UNLOCK sequence for MIPS.
1 parent 0c172b2 commit 7319ab9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/include/storage/s_lock.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
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.138 2005/08/27 16:22:48 tgl Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.139 2005/08/28 18:26:01 tgl Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -487,6 +487,14 @@ tas(volatile slock_t *lock)
487487
return _res;
488488
}
489489

490+
/* MIPS S_UNLOCK is almost standard but requires a "sync" instruction */
491+
#define S_UNLOCK(lock) \
492+
do \
493+
{\
494+
__asm__ __volatile__ (" sync \n"); \
495+
*((volatile slock_t *) (lock)) = 0; \
496+
} while (0)
497+
490498
#endif /* __mips__ && !__sgi */
491499

492500

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy