lkml.org 
[lkml]   [2008]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[M68KNOMMU]: avoid unneccessary use of xchg() in set_mb()
Avoid unneccessary use of xchg() in set_mb().

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---

diff -Naurp linux-2.6.25-rc1/include/asm-m68knommu/system.h linux-2.6.x/include/asm-m68knommu/system.h
--- linux-2.6.25-rc1/include/asm-m68knommu/system.h 2008-02-11 14:50:23.000000000 +1000
+++ linux-2.6.x/include/asm-m68knommu/system.h 2008-02-12 13:58:55.000000000 +1000
@@ -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()

\
 
 \ /
  Last update: 2008-02-12 07:15    [W:0.089 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site