On 04/07/2016 10:32 AM, Emilio G. Cota wrote: > Taken from the linux kernel. > > Signed-off-by: Emilio G. Cota <c...@braap.org> > --- > include/qemu/processor.h | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > create mode 100644 include/qemu/processor.h
Reviewed-by: Richard Henderson <r...@twiddle.net> > +#if defined(__i386__) || defined(__x86_64__) > +#define cpu_relax() asm volatile("rep; nop" ::: "memory") > +#endif Not that it matters much, but for the record there's an ICC inspired builtin in <xmmintrin.h> for this: _mm_pause(). But so long as we're always using gcc or clang, that's probably just an extra dependency to worry about. r~