Revised processor-specific hints for back-off
[libcds.git] / cds / compiler / vc / x86 / backoff.h
index 8545104dbc0348e8804dc016b9b32d536d8ddbeb..e2113e954c56e5bd74c4efb5c1dc2952a4c5770e 100644 (file)
 #define CDSLIB_COMPILER_VC_X86_BACKOFF_H
 
 //@cond none
+#include <intrin.h>
 
 namespace cds { namespace backoff {
     namespace vc { namespace x86 {
 
-#       define CDS_backoff_pause_defined
-        static inline void backoff_pause( unsigned int nLoop = 0x000003FF )
+#       define CDS_backoff_hint_defined
+        static inline void backoff_hint()
         {
-            __asm {
-                and ecx, nLoop;
-                cmovz ecx, nLoop;
-                rep nop;
-            }
+            _mm_pause();
         }
 
 #       define CDS_backoff_nop_defined