From: zippel@linux-m68k.org
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] m68k: small system.h cleanup
Date: Thu, 05 Oct 2006 01:24:18 +0200 [thread overview]
Message-ID: <20061004232500.235077000@linux-m68k.org> (raw)
In-Reply-To: 20061004232414.730831000@linux-m68k.org
[-- Attachment #1: set_current --]
[-- Type: text/plain, Size: 1022 bytes --]
avoid unnecessary xchg() use in set_mb()
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
include/asm-m68k/system.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6/include/asm-m68k/system.h
===================================================================
--- linux-2.6.orig/include/asm-m68k/system.h
+++ linux-2.6/include/asm-m68k/system.h
@@ -78,13 +78,13 @@ static inline int irqs_disabled(void)
#define mb() barrier()
#define rmb() barrier()
#define wmb() barrier()
-#define read_barrier_depends() do { } while(0)
-#define set_mb(var, value) do { xchg(&var, value); } while (0)
+#define read_barrier_depends() ((void)0)
+#define set_mb(var, value) ({ (var) = (value); wmb(); })
#define smp_mb() barrier()
#define smp_rmb() barrier()
#define smp_wmb() barrier()
-#define smp_read_barrier_depends() do { } while(0)
+#define smp_read_barrier_depends() ((void)0)
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
--
next prev parent reply other threads:[~2006-10-04 23:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 23:24 [PATCH 0/5] m68k patches zippel
2006-10-04 23:24 ` [PATCH 1/5] provide tickadj define zippel
2006-10-04 23:24 ` [PATCH 2/5] m68k: cleanup string functions zippel
2006-10-04 23:24 ` [PATCH 3/5] m68k: fix type in __generic_copy_to_user zippel
2006-10-04 23:24 ` zippel [this message]
2006-10-04 23:24 ` [PATCH 5/5] m68k: fix NBPG define zippel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061004232500.235077000@linux-m68k.org \
--to=zippel@linux-m68k.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.