barrier.h (441B)
1#ifndef LIBURING_BARRIER_H 2#define LIBURING_BARRIER_H 3 4#if defined(__x86_64) || defined(__i386__) 5#define read_barrier() __asm__ __volatile__("":::"memory") 6#define write_barrier() __asm__ __volatile__("":::"memory") 7#else 8/* 9 * Add arch appropriate definitions. Be safe and use full barriers for 10 * archs we don't have support for. 11 */ 12#define read_barrier() __sync_synchronize() 13#define write_barrier() __sync_synchronize() 14#endif 15 16#endif