Re: [Xenomai-core] [PATCH] Remove redundant LOCK prefix

2008-08-23 Thread Philippe Gerum
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@gna.org
> https://mail.gna.org/listinfo/xenomai-core


-- 
Philippe.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] [PATCH] Remove redundant LOCK prefix

2008-08-23 Thread Jan Kiszka
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");



signature.asc
Description: OpenPGP digital signature
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core