Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7319ab9

Browse files
committed
Add a SYNC instruction to the S_UNLOCK sequence for MIPS.
1 parent0c172b2 commit7319ab9

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+
#defineS_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)

[8]ページ先頭

©2009-2025 Movatter.jp