1 #ifndef LIBURING_BARRIER_H
2 #define LIBURING_BARRIER_H
4 #if defined(__x86_64) || defined(__i386__)
5 #define read_barrier() __asm__ __volatile__("":::"memory")
6 #define write_barrier() __asm__ __volatile__("":::"memory")
9 * Add arch appropriate definitions. Be safe and use full barriers for
10 * archs we don't have support for.
12 #define read_barrier() __sync_synchronize()
13 #define write_barrier() __sync_synchronize()