* [Xenomai-core] [PATCH] Remove redundant LOCK prefix
@ 2008-08-23 8:40 Jan Kiszka
2008-08-23 9:58 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2008-08-23 8:40 UTC (permalink / raw)
To: Xenomai-core
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
According to Linux and the Intel spec, this prefix is not needed.
---
include/asm-x86/atomic_32.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/include/asm-x86/atomic_32.h
===================================================================
--- a/include/asm-x86/atomic_32.h
+++ b/include/asm-x86/atomic_32.h
@@ -64,7 +64,7 @@ struct __xeno_xchg_dummy { unsigned long
static inline unsigned long xnarch_atomic_xchg (volatile void *ptr,
unsigned long x)
{
- __asm__ __volatile__(LOCK_PREFIX "xchgl %0,%1"
+ __asm__ __volatile__("xchgl %0,%1"
:"=r" (x)
:"m" (*__xeno_xg(ptr)), "0" (x)
:"memory");
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] [PATCH] Remove redundant LOCK prefix
2008-08-23 8:40 [Xenomai-core] [PATCH] Remove redundant LOCK prefix Jan Kiszka
@ 2008-08-23 9:58 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2008-08-23 9:58 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai-core
Jan Kiszka wrote:
> According to Linux and the Intel spec, this prefix is not needed.
>
Obviously, it's not, since the whole purpose of xchg() is to guarantee bus
locking for memory operands anyway. Please merge.
> ---
> include/asm-x86/atomic_32.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/include/asm-x86/atomic_32.h
> ===================================================================
> --- a/include/asm-x86/atomic_32.h
> +++ b/include/asm-x86/atomic_32.h
> @@ -64,7 +64,7 @@ struct __xeno_xchg_dummy { unsigned long
> static inline unsigned long xnarch_atomic_xchg (volatile void *ptr,
> unsigned long x)
> {
> - __asm__ __volatile__(LOCK_PREFIX "xchgl %0,%1"
> + __asm__ __volatile__("xchgl %0,%1"
> :"=r" (x)
> :"m" (*__xeno_xg(ptr)), "0" (x)
> :"memory");
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-23 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-23 8:40 [Xenomai-core] [PATCH] Remove redundant LOCK prefix Jan Kiszka
2008-08-23 9:58 ` Philippe Gerum
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.