Use gcc builtin rather than asm for memory barriers
Use gcc builtin rather than asm for memory barriers

This should make things more portable.

On my machine, __sync_synchronize() uses mfence rather than lock; addl;
Looking at the kernel memory barriers, this should be fine:
http://lxr.free-electrons.com/source/arch/x86/um/asm/barrier.h

The kernel favours using mfence, but falls back to lock; addl; when it's
not available (32 bit non-SSE machines).

https://bugs.freedesktop.org/show_bug.cgi?id=86997

fgouget/spice-protocol,SPICE/spice-protocol,fgouget/spice-protocol,fgouget/spice-protocol,SPICE/spice-protocol,SPICE/spice-protocol