cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

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