barrier.h 675 B

123456789101112131415161718192021222324252627282930
  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 - 2005 Tensilica Inc.
  7. */
  8. #ifndef _XTENSA_SYSTEM_H
  9. #define _XTENSA_SYSTEM_H
  10. #define smp_read_barrier_depends() do { } while(0)
  11. #define read_barrier_depends() do { } while(0)
  12. #define mb() barrier()
  13. #define rmb() mb()
  14. #define wmb() mb()
  15. #ifdef CONFIG_SMP
  16. #error smp_* not defined
  17. #else
  18. #define smp_mb() barrier()
  19. #define smp_rmb() barrier()
  20. #define smp_wmb() barrier()
  21. #endif
  22. #define set_mb(var, value) do { var = value; mb(); } while (0)
  23. #endif /* _XTENSA_SYSTEM_H */