mirror of
				https://git.proxmox.com/git/qemu
				synced 2025-10-31 16:49:58 +00:00 
			
		
		
		
	 1d93f0f03d
			
		
	
	
		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
 |