mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 06:13:46 +08:00
1d93f0f03d
Define barrier() as optimization barrier and replace (potentially unreliable) asm("") fences. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 lines
226 B
C
11 lines
226 B
C
#ifndef __QEMU_BARRIER_H
|
|
#define __QEMU_BARRIER_H 1
|
|
|
|
/* FIXME: arch dependant, x86 version */
|
|
#define smp_wmb() asm volatile("" ::: "memory")
|
|
|
|
/* Compiler barrier */
|
|
#define barrier() asm volatile("" ::: "memory")
|
|
|
|
#endif
|