atomic.h 862 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * linux/include/asm-arm/atomic.h
  3. *
  4. * Copyright (c) 1996 Russell King.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Changelog:
  11. * 27-06-1996 RMK Created
  12. * 13-04-1997 RMK Made functions atomic!
  13. * 07-12-1997 RMK Upgraded for v2.1.
  14. * 26-08-1998 PJB Added #ifdef __KERNEL__
  15. */
  16. #ifndef __ASM_ARM_ATOMIC_H
  17. #define __ASM_ARM_ATOMIC_H
  18. #ifdef CONFIG_SMP
  19. #error SMP not supported
  20. #endif
  21. #include <asm/proc-armv/system.h>
  22. #include <asm-generic/atomic.h>
  23. /* Atomic operations are already serializing on ARM */
  24. #define smp_mb__before_atomic_dec() barrier()
  25. #define smp_mb__after_atomic_dec() barrier()
  26. #define smp_mb__before_atomic_inc() barrier()
  27. #define smp_mb__after_atomic_inc() barrier()
  28. #endif