mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Introduce proper compiler barrier
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>
This commit is contained in:
parent
1e29a009e3
commit
1d93f0f03d
2 changed files with 6 additions and 2 deletions
|
@ -4,4 +4,7 @@
|
|||
/* FIXME: arch dependant, x86 version */
|
||||
#define smp_wmb() asm volatile("" ::: "memory")
|
||||
|
||||
/* Compiler barrier */
|
||||
#define barrier() asm volatile("" ::: "memory")
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue