Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
barrier.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2006 Atmel Corporation
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 #ifndef __ASM_AVR32_BARRIER_H
9 #define __ASM_AVR32_BARRIER_H
10 
11 #define nop() asm volatile("nop")
12 
13 #define mb() asm volatile("" : : : "memory")
14 #define rmb() mb()
15 #define wmb() asm volatile("sync 0" : : : "memory")
16 #define read_barrier_depends() do { } while(0)
17 #define set_mb(var, value) do { var = value; mb(); } while(0)
18 
19 #ifdef CONFIG_SMP
20 # error "The AVR32 port does not support SMP"
21 #else
22 # define smp_mb() barrier()
23 # define smp_rmb() barrier()
24 # define smp_wmb() barrier()
25 # define smp_read_barrier_depends() do { } while(0)
26 #endif
27 
28 
29 #endif /* __ASM_AVR32_BARRIER_H */