3 #ifndef __CDS_COMPILER_GCC_X86_BACKOFF_H
4 #define __CDS_COMPILER_GCC_X86_BACKOFF_H
8 namespace cds { namespace backoff {
9 namespace gcc { namespace x86 {
11 # define CDS_backoff_pause_defined
12 static inline void backoff_pause( unsigned int nLoop = 0x000003FF )
15 "andl %[nLoop], %%ecx; \n\t"
16 "cmovzl %[nLoop], %%ecx; \n\t"
25 # define CDS_backoff_nop_defined
26 static inline void backoff_nop()
28 asm volatile ( "nop;" );
31 }} // namespace gcc::x86
34 using namespace gcc::x86;
36 }} // namespace cds::backoff
39 #endif // #ifndef __CDS_COMPILER_GCC_X86_BACKOFF_H