Skip to content

Commit ce92f8b

Browse files
committed
Use _mm_pause() for win64 spin_delay(), per note from Tsutomu Yamada.
1 parent 5219f80 commit ce92f8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/include/storage/s_lock.h

Lines changed: 3 additions & 3 deletions
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.170 2010/01/04 17:10:24 mha Exp $
69+
* $PostgreSQL: pgsql/src/include/storage/s_lock.h,v 1.171 2010/01/05 11:06:28 mha Exp $
7070
*
7171
*-------------------------------------------------------------------------
7272
*/
@@ -837,13 +837,13 @@ typedef LONG slock_t;
837837
#define SPIN_DELAY() spin_delay()
838838

839839
/* If using Visual C++ on Win64, inline assembly is unavailable.
840-
* Use a __nop instrinsic instead of rep nop.
840+
* Use a _mm_pause instrinsic instead of rep nop.
841841
*/
842842
#if defined(_WIN64)
843843
static __forceinline void
844844
spin_delay(void)
845845
{
846-
__nop();
846+
_mm_pause();
847847
}
848848
#else
849849
static __forceinline void

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