]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
m68knommu: avoid unneccessary use of xchg() in set_mb()
authorGreg Ungerer <gerg@snapgear.com>
Fri, 15 Feb 2008 03:31:25 +0000 (19:31 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 15 Feb 2008 04:58:05 +0000 (20:58 -0800)
Avoid unneccessary use of xchg() in set_mb().

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-m68knommu/system.h

index 039ab3f817328ec639cc2a59ea7a9581463e6623..64c64432bbb80248c44ddfc34a6cc98beff938e1 100644 (file)
@@ -104,7 +104,7 @@ asmlinkage void resume(void);
 #define mb()   asm volatile (""   : : :"memory")
 #define rmb()  asm volatile (""   : : :"memory")
 #define wmb()  asm volatile (""   : : :"memory")
-#define set_mb(var, value) do { xchg(&var, value); } while (0)
+#define set_mb(var, value)     ({ (var) = (value); wmb(); })
 
 #ifdef CONFIG_SMP
 #define smp_mb()       mb()