diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libpq/windows/spin_delay.patch | |
Diffstat (limited to 'vcpkg/ports/libpq/windows/spin_delay.patch')
| -rw-r--r-- | vcpkg/ports/libpq/windows/spin_delay.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vcpkg/ports/libpq/windows/spin_delay.patch b/vcpkg/ports/libpq/windows/spin_delay.patch new file mode 100644 index 0000000..163e8e6 --- /dev/null +++ b/vcpkg/ports/libpq/windows/spin_delay.patch @@ -0,0 +1,24 @@ +diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h +index 4d3ffc7..658b1a1 100644 +--- a/src/include/storage/s_lock.h ++++ b/src/include/storage/s_lock.h +@@ -953,12 +953,18 @@ typedef LONG slock_t; + /* If using Visual C++ on Win64, inline assembly is unavailable. + * Use a _mm_pause intrinsic instead of rep nop. + */ +-#if defined(_WIN64) ++#if defined(_M_X64) && !defined(_M_ARM64EC) + static __forceinline void + spin_delay(void) + { + _mm_pause(); + } ++#elif defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) ++static __forceinline void ++spin_delay(void) ++{ ++ __yield(); ++} + #else + static __forceinline void + spin_delay(void) |