barrier.h 542 B

12345678910111213141516171819202122
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2001 - 2012 Tensilica Inc.
  7. */
  8. #ifndef _XTENSA_SYSTEM_H
  9. #define _XTENSA_SYSTEM_H
  10. #define mb() ({ __asm__ __volatile__("memw" : : : "memory"); })
  11. #define rmb() barrier()
  12. #define wmb() mb()
  13. #define __smp_mb__before_atomic() barrier()
  14. #define __smp_mb__after_atomic() barrier()
  15. #include <asm-generic/barrier.h>
  16. #endif /* _XTENSA_SYSTEM_H */