mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2025-12-26 14:18:31 +00:00
define spice_mb MemoryBarrier for WIN64
__asm is not supported on _WIN64, so use macro instead required for Windows x64 guest display driver (qxldd.dll)
This commit is contained in:
parent
432519f712
commit
7134a4591c
@ -33,14 +33,23 @@
|
||||
#define _H_SPICE_BARRIER
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
#ifdef __i386__
|
||||
#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
|
||||
#else
|
||||
//mfence
|
||||
#define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory")
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef _WIN64
|
||||
//__asm not supported on _WIN64, so use macro instead.
|
||||
#define spice_mb MemoryBarrier
|
||||
#else
|
||||
#define spice_mb() __asm {lock add [esp], 0}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _H_SPICE_BARRIER */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user