Xen Test Framework
Macros
barrier.h File Reference
#include <xtf/compiler.h>
+ Include dependency graph for barrier.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define mb()   __asm__ __volatile__ ("mfence" ::: "memory")
 
#define rmb()   __asm__ __volatile__ ("lfence" ::: "memory")
 
#define wmb()   __asm__ __volatile__ ("sfence" ::: "memory")
 
#define smp_mb()   __asm__ __volatile__ ("lock addl $0, -4(%%rsp)" ::: "memory");
 
#define smp_rmb()   barrier()
 
#define smp_wmb()   barrier()
 

Macro Definition Documentation

◆ mb

#define mb ( )    __asm__ __volatile__ ("mfence" ::: "memory")

Definition at line 26 of file barrier.h.

◆ rmb

#define rmb ( )    __asm__ __volatile__ ("lfence" ::: "memory")

Definition at line 27 of file barrier.h.

◆ wmb

#define wmb ( )    __asm__ __volatile__ ("sfence" ::: "memory")

Definition at line 28 of file barrier.h.

◆ smp_mb

#define smp_mb ( )    __asm__ __volatile__ ("lock addl $0, -4(%%rsp)" ::: "memory");

Definition at line 33 of file barrier.h.

◆ smp_rmb

#define smp_rmb ( )    barrier()

Definition at line 35 of file barrier.h.

◆ smp_wmb

#define smp_wmb ( )    barrier()

Definition at line 36 of file barrier.h.