aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68k/system.h
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-10-06 03:43:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-06 11:53:41 -0400
commit9ef308946fa8390136130a886b0d9a57867a747a (patch)
treef6a14e8639ae5b749a530fd2ce92ee66d9e69072 /include/asm-m68k/system.h
parent6c04c28a656c1717fbe617efc40edabca3a85ca3 (diff)
[PATCH] m68k: small system.h cleanup
avoid unnecessary xchg() use in set_mb() Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-m68k/system.h')
-rw-r--r--include/asm-m68k/system.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h
index 131a0cb0f491..243dd13e6bfc 100644
--- a/include/asm-m68k/system.h
+++ b/include/asm-m68k/system.h
@@ -78,13 +78,13 @@ static inline int irqs_disabled(void)
78#define mb() barrier() 78#define mb() barrier()
79#define rmb() barrier() 79#define rmb() barrier()
80#define wmb() barrier() 80#define wmb() barrier()
81#define read_barrier_depends() do { } while(0) 81#define read_barrier_depends() ((void)0)
82#define set_mb(var, value) do { xchg(&var, value); } while (0) 82#define set_mb(var, value) ({ (var) = (value); wmb(); })
83 83
84#define smp_mb() barrier() 84#define smp_mb() barrier()
85#define smp_rmb() barrier() 85#define smp_rmb() barrier()
86#define smp_wmb() barrier() 86#define smp_wmb() barrier()
87#define smp_read_barrier_depends() do { } while(0) 87#define smp_read_barrier_depends() ((void)0)
88 88
89 89
90#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 90#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))