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

Commit305e85b

Browse files
committed
Add a Win64-specific spin_delay() function.
We can't use the same as before, since MSVC on Win64 doesn'tsupport inline assembly.
1 parent4c5b4c8 commit305e85b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎src/include/storage/s_lock.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* Portions Copyright (c) 1996-2010, 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.169 2010/01/02 16:58:08 momjian Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.170 2010/01/04 17:10:24 mha Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -836,12 +836,23 @@ typedef LONG slock_t;
836836

837837
#defineSPIN_DELAY() spin_delay()
838838

839+
/* If using Visual C++ on Win64, inline assembly is unavailable.
840+
* Use a __nop instrinsic instead of rep nop.
841+
*/
842+
#if defined(_WIN64)
843+
static __forceinlinevoid
844+
spin_delay(void)
845+
{
846+
__nop();
847+
}
848+
#else
839849
static __forceinlinevoid
840850
spin_delay(void)
841851
{
842852
/* See comment for gcc code. Same code, MASM syntax */
843853
__asmrepnop;
844854
}
855+
#endif
845856

846857
#endif
847858

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp