|
66 | 66 | * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group |
67 | 67 | * Portions Copyright (c) 1994, Regents of the University of California |
68 | 68 | * |
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 $ |
70 | 70 | * |
71 | 71 | *------------------------------------------------------------------------- |
72 | 72 | */ |
@@ -836,12 +836,23 @@ typedef LONG slock_t; |
836 | 836 |
|
837 | 837 | #defineSPIN_DELAY() spin_delay() |
838 | 838 |
|
| 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 |
839 | 849 | static __forceinlinevoid |
840 | 850 | spin_delay(void) |
841 | 851 | { |
842 | 852 | /* See comment for gcc code. Same code, MASM syntax */ |
843 | 853 | __asmrepnop; |
844 | 854 | } |
| 855 | +#endif |
845 | 856 |
|
846 | 857 | #endif |
847 | 858 |
|
|