xref: /kvm-unit-tests/lib/x86/asm/barrier.h (revision 8226c540c626227c84e390755237c787eb518e1c)
1 #ifndef _ASM_X86_BARRIER_H_
2 #define _ASM_X86_BARRIER_H_
3 /*
4  * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <agordeev@redhat.com>
5  *
6  * This work is licensed under the terms of the GNU LGPL, version 2.
7  */
8 
9 #define mb()	asm volatile("mfence":::"memory")
10 #define rmb()	asm volatile("lfence":::"memory")
11 #define wmb()	asm volatile("sfence":::"memory")
12 
13 #endif
14